Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 2.53 KB

README.org

File metadata and controls

71 lines (49 loc) · 2.53 KB

eglot-jl

This is a simple package to make using Julia’s language server easier with eglot. It can be installed from melpa by adding melpa to your package-archives and doing M-x package-install RET eglot-jl RET with Emacs 26.1+.

After installation, eglot-jl-init will load support for the Julia language server into eglot and project.el. If eglot-jl-init has been run in your emacs session, running eglot in a julia-mode buffer will start a language server for the Julia project to which the buffer belongs. The first time eglot is run, the Julia language server will be downloaded and installed into the default depot (e.g. ~/.julia) in its own isolated project environment. This may take a long time, so eglot-connect-timeout should be increased for this first run.

Capabilities

Completion:

./images/completion.gif

Show help and signatures in the minibuffer:

./images/minibuffer_help.gif

Show docstring for symbol at point (eglot-help-at-point):

./images/eglot-help-at-point.gif

Jump to definitions of symbol at point (xref-find-definitions):

./images/xref-find-definitions.gif

Rename symbol at point (eglot-rename):

./images/eglot-rename.gif

Linting:

./images/lint.gif

Jump to symbol in document imenu:

./images/imenu.gif

FAQ

Why am I receiving Error running timer: (error "[eglot] Timed out") messages?

The most likely reason is that SymbolServer.jl takes a very long time to process project dependencies. This is a one-time process that shouldn’t cause issues once the dependencies are cached, however it can take over a minute to process each dependency. By default, eglot will only wait wait 30 seconds for a language server to be ready; this is controlled by eglot-connect-timeout.

To work around this issue, you can:

  1. Set eglot-connect-timeout to a very high value.
    • Progress of the SymbolServer can be monitored in the *EGLOT (ProjectName/julia-mode) stderr* buffer.
  2. Run the following, from your project directory:
julia --project=path/to/eglot-jl/ path/to/eglot-jl/eglot-jl.jl

The SymbolServer is finished with caching dependencies when it displays:

[ Info: Received new data from Julia Symbol Server.