Julia in IntelliJ, using language server

A colleague of mine recently tried out using IntelliJ IDEA’s LSP4JL plugin and the Julia LanguageServer.jl package, and discovered it works pretty well. I tried it too and had pretty good results.

It works far better, for example, than the IntelliJ Julia plugin https://plugins.jetbrains.com/plugin/10413-julia/reviews , which seems to be long-abandoned and completely broken.

To configure, install LanguageServer.jl in your global environment (unless you prefer it somewhere else), and add these configurations to IntelliJ:

I haven’t yet pushed it very far to see what integration points this enables, but editing works pretty well, and command-click navigation does too. For a REPL I’ve just executed julia in a shell window, which works fine.

I’d love to find out if other people are successfully using this setup, whether I’ve missed any functionality, and/or whether further integration is likely to happen!

4 Likes

For example: I’d love to find a way to highlight a chunk of code and get it executed in the current REPL. I haven’t found a command for that yet.

It is nice that one get Julia to run in IDEA. But: IDEA is a paid product. (Might be worth to just state it here, as it may be a dealbreaker for some.)

IDEA is not always a paid product. The full “Ultimate” platform is free for open-source projects, and also for students and teachers, among other scenarios. Details here.

There is also the free and open-source Community Edition, which is the same product with a smaller set of features. The LSP4JL plugin I mentioned indicates that it’s compatible with the Community Edition.

<somewhat-irrelevant-aside>
That said, I’m personally a paying user, just because I find it to be worth the money. I would love to use the same setup for Julia as I use for other languages, and subjectively I just don’t enjoy using VS Code very much either. Maybe I’d get used to it after a couple years, but I don’t really want to put that time in. At this point in my career I’m happy with the combination of IDEA and Emacs.

I definitely do understand that people can have strongly held opinions on the tools they choose (or choose not) to use - for some people that’s cost, or open-source-ness, or anti-capitalism, or ergonomics, or just personal inertia, etc. etc. etc. and I think that’s all very legitimate. Really, that’s why I’ve been surprised that the Julia community really only “supports” VS Code; from my point of view it would be awesome to extend that more widely, but I’ve assumed that the main reason is simply lack of resources to do so?
</somewhat-irrelevant-aside>

2 Likes