Set up Sublime Text 3 for Julia

This thread is old so I’m not sure if anybody still needs this info, but it’s new to me. :slight_smile: I got Sublime Text 3 LSP working with Julia today by simply following the instructions on this page: Sublime Text Language Server Protocol Documentation - Julia

Key versions:

  • Julia 1.3.1
  • LanguageServer.jl v1.0.0
  • SymbolServer.jl v1.0.1
  • Windows 10 64-bit

There is no need to install package LSP-julia.

These features seem to work:

  • Mouse hovering to show doc string / variable definition.
  • Right click a symbol (e.g. function name), choose LSP to “Find Symbol References”, or “Go to Symbol Definition”, or “Format Document”

For unknown reason, “Rename Symbol” does not seem to work for me.

One puzzle I spent hours to figure out: LSP for Julia started working on one of my PCs but not on another, with everything at exactly the same version, and Sublime Text 3 being an exact clone of each other (I use the portable version). On the PC that’s not working, I could see the Julia process running the language server in the background, but Sublime Text 3 never showed “julials initialized” message.

It turned out to be the firewall blocking port 8080, which is the default port used by the language server! Once I opened TCP port 8080 on my Windows Firewall julials started working.

Luckily I don’t use port 8080 for anything else, otherwise I would have to set up a different port for the language server, which can easily be done on Sublime Text 3 side (just search “tcp_port” in the Sublime Text Language Server Protocol Documentation), but I have no idea how for LanguageServer.jl

2 Likes