Specifically, the way the Mason folks rewrote the Julia LS launch config to work with the new neovim 0.11+ built-in LSP functionality (which is what the v2 release was about) is built on a subtle misunderstanding of the nvim LSP docs. They didn’t use this approach for any other LS’s, which I guess is why they didn’t realize that it doesn’t work. It’s not hard to fix, just need a sec to try out a couple of alternative approaches and make a PR.
In the meantime, as @jling said, the solution is to not install Julia LS via mason, but rather set it up yourself with the help of nvim-lspconfig. That means
- Create a shared Julia environment
@nvim-lspconfigand manually installLanguageServer.jlin it:julia --project=@nvim-lspconfig -e 'Using Pkg; Pkg.add("LanguageServer")' - Make sure
nvim-lspconfigis installed - Add the line
vim.lsp.enable("julials")somewhere in your neovim configuration, for example where you installnvim-lspconfig(if you uselazy.nvim, I’d add it to either theinitoroptsfunction in thenvim-lspconfigentry).- Note that
vim.lsp.enable(server)doesn’t launch the server, it just tells neovim to automatically launch it once you open a relevant file type, so don’t worry about only running the command conditionally on.jlfiles or anything like that.
- Note that