Thanks! Any thoughts on julia-snail v. eglot+julia-repl? Seems similar but slightly different workflows…any other tradeoffs?
I keep running into non-julia issuess (I don’t have anaconda, night-notes isn’t working, etc). I will let you know once i get your profile to load if it’s working.
Hmm
Do you have Telegram? If so, send me the errors at @Arstar, and I’ll try making my config work without those assumptions. (Or send messages here if discourse supports them; I haven’t tried that.)(Or just open Github issues.)
Eglot+julia-repl seems to work very well; I didn’t play too much with it, as my VSCode setup was superior. No idea about Julia-snail. One good thing about using emacs-jupyter is that it will probably be stable and not break, as it is interfacing with the stable API of jupyter. The language server seems less stable (eglot didn’t work for me around 3 months ago, but it works with my current environment.).
So as you probably figured out, eglot allows you to use LangaugeServer.jl as a language server which as far as I know uses some kind of static analysis of the code in order to provide completions and such (someone with more knowledge on the inner workings could comment on this). Since LangaugeServer.jl is a key part of the VScode extension quite a lot of work is invested in it by several contributors, so I think it will only get better.
On the other hand julia-snail as far as I understand it is more meant for an interactive development workflow where you send your code to the REPL and play with it (it also has a way to evaluate code inside a module in order to update functions and stuff, although this is not so necessary with Revise). For completions it gets dynamical information from the REPL, I think this allows it to have some information about current objects and functions that LangaugeServer.jl can’t have, but maybe I’m wrong. As opposed to LangaugeServer.jl, snail doesn’t provide any liniting capabilities.
One advantage with snail for me is that I managed to make it work also when editing remote files via TRAMP (using a personal branch of snail, but I can provide some instructions). Also snail works when you are not in any project directory, as opposed to LanguageServer for which you must be inside some project directroy (i.e. one with a Project.toml file). But since it is best practice to always have a dedicated Project.toml file for your projects I guess this is not really a big deal.
One current problem with snail is that code completion can get quite slow when editing large files, due to inherent slowness of its parser. There are some ideas how to possibly improve this, but not sure when or if it will happen.
I am trying to use emacs-jupyter (+ eglot) and things are working nicely (including completion of functions, objects, showing help from company with company-show-doc-buffer and company-quickhelp, etc) but I have stumbled into some issues with completion of file names and I do not know if I am doing something wrong.
-
When using includet or CSV.read, completion using company does not include file names. It only shows directories. This happens in the
*jupyter-repl*
buffer and in the julia code buffer associated with the*jupyter-repl*
. However, company shows file names in julia code buffers managed by eglot. (I am using also company in R, and in both the inferior R process and R code ESS buffers, company shows file names and directories. As well —though this does not use company— in the REPL itself, or in julia-repl, pressing tab shows file names; in a “regular iJulia notebook”, both includet and CSV.read include as candidates also file names when using tab). -
When in shell mode (after typing “;”), completion of directories does not seem to work or it expands to names of functions, etc, but not directories; this happens, for example, when trying to cd to some directory. (This also happens in a “regular iJulia notebook”, not via
emacs-jupyter
, so I guess it is not specific to emacs-jupyter.) -
For shell model, using ~ seems not to work (this also happens in a “regular iJulia notebook” so I guess it is not specific to emacs-jupyter).
(In case it matters, I am not using org for this; simply jupyter-run-repl
and jupyter-repl-associate-buffer
in a .jl file, for example as explained here : Jupyter integration with emacs - #5 by ffevotte)
I have company-capf and company-files as company-backends (and, as I said, file names are shown in julia code buffers managed by eglot and in R/ESS for example).
Is there anything I can change to improve these completions?