doomemacs/modules/lang/julia
Kiran Shila 71535d7ffc
docs(julia): update lsp environment to recent LTS
As of 1 Dec, Julia v1.6 is the new LTS release.

Ref: #6010
2022-01-27 03:37:26 +01:00
..
autoload.el Run julia-repl-use-emacsclient after opening a REPL 2020-04-23 23:56:18 -04:00
config.el lang/julia: auto-detect default environment 2021-05-10 21:56:02 -04:00
doctor.el lang/julia: improve lsp support (#4012) 2021-03-01 22:25:35 -05:00
packages.el bump: :lang 2021-09-15 01:22:33 +02:00
README.org docs(julia): update lsp environment to recent LTS 2022-01-27 03:37:26 +01:00

:lang julia

Back to module index ! Issues ↖ Github ± Suggest edits ? Help


Description   unfold

This module adds support for the Julia language to Doom Emacs.

Maintainers

This module has no dedicated maintainers. Become a maintainer?

Module flags

+lsp
Enable LSP support for julia-mode. Requires :tools lsp and a langserver (supports LanguageServer.jl).

Hacks

No hacks documented for this module.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module requires Julia and an language server if +lsp is enabled.

Language Server

+lsp requires LanguageServer.jl and SymbolServer.jl. The lsp-julia and eglot-jl packages both come bundled with their own versions of these servers, which is used by default. If you're happy with that, no further configuration is necessary.

However, to use your own installation you will need to install then configure them. To install them, execute these commands in a Julia REPL:

using Pkg
Pkg.add("LanguageServer")
Pkg.add("SymbolServer")

Then configure lsp-julia or eglot-jl depending on whether you have enabled :tools lsp or :tools lsp +eglot, respectively:

lsp-julia

To instruct lsp-julia not to use the built-in package:

;; in $DOOMDIR/config.el
(setq lsp-julia-package-dir nil)

To find your installation of LanguageServer.jl, lsp-julia needs to know the environment in which it is installed. This is set to v1.6 by default as it is the current LTS:

;; in $DOOMDIR/config.el
(after! lsp-julia
  (setq lsp-julia-default-environment "~/.julia/environments/v1.6"))

eglot-jl

To find your installation of LanguageServer.jl, eglot-jl must know the environment in which it is installed. This is set to v1.6 by default as it is the current LTS:

;; in $DOOMDIR/config.el
(setq eglot-jl-language-server-project "~/.julia/environments/v1.6")

But to let eglot-jl use the environment bundled with it, set it to eglot-jl-base instead:

;; in $DOOMDIR/config.el
(after! eglot-jl
  (setq eglot-jl-language-server-project eglot-jl-base))

TODO Usage

🔨 This module's usage documentation is incomplete. Complete it?

Language Server

+lsp adds code completion, syntax checking, formatting and other lsp-mode or eglot features. It requires LanguageServer.jl, the installation of which is described above.

TODO Configuration

🔨 This module's configuration documentation is incomplete. Complete it?

Change the default environment for the Julia language server

lsp-julia requires a variable be set for the Julia environment. This is set to v1.6 by default as it is the current LTS:

;; in $DOOMDIR/config.el
(after! lsp-julia
  (setq lsp-julia-default-environment "~/.julia/environments/v1.6"))

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

🔨 This module has no appendix yet. Write one?