Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Julia

Install

macOS / Linux / Windows

From the Julia REPL:

using Pkg
Pkg.add("LanguageServer")

Config

Add to ~/.config/catenary/config.toml:

[server.julia-ls]
command = "julia"
args = ["--startup-file=no", "--history-file=no", "-e", "using LanguageServer; runserver()"]

[language.julia]
servers = ["julia-ls"]

Notes

  • The server starts a Julia process, which has some startup time
  • --startup-file=no and --history-file=no speed up startup
  • First run on a project may take time to load packages and index
  • Works best with projects that have a Project.toml

Reducing Startup Time

For faster startup, you can create a custom sysimage:

using PackageCompiler
create_sysimage([:LanguageServer], sysimage_path="languageserver.so")

Then use:

[server.julia-ls]
command = "julia"
args = ["--sysimage=/path/to/languageserver.so", "-e", "using LanguageServer; runserver()"]

[language.julia]
servers = ["julia-ls"]