Emacs and julia

Hello emacs users,
I see that there are at least 4 different ways to use julia from emacs.

julia-mode (official one?)
ESS
julia-repl
julia-shell-mode

What are their respective strengths and features?
Is there any reason to use one over another?

4 Likes

I use emacs but I hate the shell mode… I believe julia-mode should have the most up-to-date syntax though there are still known bugs in it.

I believe at least one (or both) of the repo/shell mode are built on top of julia-mode but I’m not entirely sure.

ESS wraps around julia-mode and is a good choice if you also do programming in R. julia-repl is a minor mode for julia-mode and provides integration into term, it supports the Gallium debugger and is an alternative to ESS.

2 Likes

Sidenote: I just got julia-repl into MELPA. But until Gallium runs on 0.6, the extra functionality over ESS is merely nice colors in the terminal.

2 Likes

Some folks have had success in using LanguageServer.jl with emacs. There are still some hickups that we need to sort out, so probably best at this point to wait until these are resolved, but in principle it sounds as if we will be able to integrate nicely. See this issue for the current status:

https://github.com/JuliaEditorSupport/LanguageServer.jl/issues/110

This is very exciting. I expect I will contribute there, as julia-mode is just a workaround and the approach does not scale well.

I’ve been using ESS, but I’m not totally satisfied. There is no completion with my setup. I’m using spacemacs, if that matters.

you need to be careful with syntax highlighting in the repl, ESS had some serious performance issues when the repl accumulates too many lines of output.

autocompletion with ess should work out of the box with spacemacs, do you have the auto-completion layer in dotspacemacs-configuration-layers?

yes, I do, and company mode is indicated in modeline

That is strange, sometimes it helps to delete temporary files from your .emacs.d folder (recentf and the content of the .cache folder) or to recompile all your packages, there is even a function for that (spacemacs/recompile-elpa).

I have downloaded julia-mode and ess from the melpa repository and eldoc and completion do not work.

TAB does not have any effect. If I type map( at the julia prompt, eloc prints map: in the minibuffer without displaying the arguments.

The help system works as expected though. The mode line displays (iESS [julia]: run ElDoc). I am using emacs 25.1.1, this is a basic install with default configuration. I byte-recompiled ess without success. Any hint? Maybe I should install and build ess from git.

EDIT: an upgrade of ESS from MELPA to the latest version solved the problem.

checkout this: Julia Spacemacs layer