I’m trying to set-up an (efficient) Emacs-based workflow to develop Julia code (on a linux system).
Currently, here is what I’m using:
I have a live Julia REPL in an
ansi-termbuffer, which uses
Reviseto update the Julia code as I edit source files. I’m currently using my own isend-mode package to interact with this buffer and evaluate Julia code blocks, but am thinking of trying @Tamas_Papp’s julia-repl instead1.
In order to search for something in the documentation, I use zeal and zeal-at-point. But I don’t like spawning an external process (and window), especially when most of this documentation (and more) is available from Julia itself in a form that could easily be browsed within Emacs (but I haven’t found any readily-available tool to do this).
In order to search for and (jump to) function definitions, I’m using InteractiveCodeSearch.jl. Again, I’d like to streamline the process of looking for the definition of the function at point (which I don’t think would be too difficult; I might try to develop a package to do it if I get around to it…)
Some of the points bothering me might very well be fixed by
LanguageServer and lsp-mode, but I haven’t been able to successfully set these up yet. I had difficulties installing
LanguageServer, and then had some trouble with
lsp-julia2. In your opinion, is it worth to invest some time to make it work?
On another note, one thing I lack is the ability to quickly run tests. In most other languages (like C++ or Python), I would set up compilation commands to build and/or test my program, and bind them to a single key so that I can speed-up development cycles. In Julia, I use the same technique to run thorough tests (as in
julia -O3 --project runtests.jl), but long startup times prevent me from running these too often. Most of the time, I simply go to the REPL and hit upRET. But I don’t like this process very much, since it sometimes interferes with other experiments I made in the REPL (and e.g. the last command is not what I thought it would be).
Have I blatantly missed anything? Do you (Emacs users) have entirely different workflows? Are you facing some of the same issues?
1 in particular,
julia-repl's use of bracketed paste might solve some quirks I have with
isend-mode when sending indented blocks.
2 I tried to use @gdkrmr’s fork of lsp-julia (which seemed to be the most up-to-date) and had strange Emacs errors. At first sight, it looked like these might be due to incompatibilities between recent
lsp-mode versions and my outdated Emacs-25; I’ll have to investigate.