# Neovim + LanguageServer.jl crashing again

**URL:** https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273
**Category:** Tooling
**Tags:** languageserver, neovim
**Created:** [June 27, 2025, 9:48am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273 "2025-06-27T09:48:09Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)
#### Post date: [June 27, 2025, 9:48am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/1 "2025-06-27T09:48:09Z")

</div>

This was discussed before but the issue I run into is new so I’m asking a new question. The language server started crashing with the message

```bash
Client julials quit with exit code 1 and signal 0. Check log for errors: /home/mike/.local/state/nvim/lsp.log

```

a few weeks ago and I haven’t been able to fix it. Mostly because I get no error outputs in the log so it’s quite difficult to debug to say the least. The `lsp.log` file is empty even if the got the message above as a notification when trying to start the server.

I use the `nvim-kickstart` project which I’ve tweaked a bit, but the gist is `nvim-lspconfig` and `mason-lspconfig` controls the start of the languageserver.

Did anyone run into something similar?

---

<div class="post-metadata">

### Author: ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)
#### Post date: [June 27, 2025, 3:05pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/2 "2025-06-27T15:05:14Z")

</div>

I think you’re running into [`before_init` is too late to change `cmd` =\> Julia LS won't start · Issue #582 · mason-org/mason-lspconfig.nvim · GitHub](https://github.com/mason-org/mason-lspconfig.nvim/issues/582) which was uncovered by Daniel Wennberg.

Basically, when `mason-lspconfig` migrated to v2, it broke Julia. So for now you have to disable `mason-lspconfig` for Julia and enable it manually from `nvim-lspconfig`.

---

<div class="post-metadata">

### Author: ![danielwe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielwe/32/35657_2.png) [@danielwe](https://discourse.julialang.org/u/danielwe)
#### Post date: [June 27, 2025, 6:25pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/3 "2025-06-27T18:25:15Z")

</div>

> [@jling](#):
>
> when `mason-lspconfig` migrated to v2, it broke Julia

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-lspconfig` and manually install `LanguageServer.jl` in it: `julia --project=@nvim-lspconfig -e 'Using Pkg; Pkg.add("LanguageServer")'`
- Make sure `nvim-lspconfig` is installed
- Add the line `vim.lsp.enable("julials")` somewhere in your neovim configuration, for example where you install `nvim-lspconfig` (if you use `lazy.nvim`, I’d add it to either the `init` or `opts` function in the `nvim-lspconfig` entry).
  - 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 `.jl` files or anything like that.

---

<div class="post-metadata">

### Author: ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)
#### Post date: [June 27, 2025, 6:41pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/4 "2025-06-27T18:41:32Z")

</div>

Right. Julia was also the only setup that broke for me. Thanks for the explanation. 🙏🏻 May I ask how you figured it out without any debug messages?

---

<div class="post-metadata">

### Author: ![danielwe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielwe/32/35657_2.png) [@danielwe](https://discourse.julialang.org/u/danielwe)
#### Post date: [June 27, 2025, 7:46pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/5 "2025-06-27T19:46:05Z")

</div>

In short, messing around with the various scripts and commands within `mason-lspconfig`s Julia config to make sure logs were emitted at all levels and noticing that the command that was being launched was the provisional placeholder and not the full command configured inside `before_init`.

---

<div class="post-metadata">

### Author: ![Antomek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/antomek/32/9406_2.png) [@Antomek](https://discourse.julialang.org/u/Antomek)
#### Post date: [July 23, 2025, 7:57am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/6 "2025-07-23T07:57:13Z")

</div>

Thanks for figuring this all out!

Please forgive my naivety, but how do we tell `nvim-lspconfig` about this new shared `@nvim-lspconfig` environment? Or does it somehow know about this automatically?

---

<div class="post-metadata">

### Author: ![danielwe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielwe/32/35657_2.png) [@danielwe](https://discourse.julialang.org/u/danielwe)
#### Post date: [July 23, 2025, 7:14pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/7 "2025-07-23T19:14:52Z")

</div>

Yes, this is where `nvim-lspconfig` expects to find the Julia LS.

`nvim-lspconfig` is a collection of community-contributed language server configs, and the config for Julia has `@nvim-lsconfig` hardcoded as the environment where the language server should be installed.

---

<div class="post-metadata">

### Author: ![Antomek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/antomek/32/9406_2.png) [@Antomek](https://discourse.julialang.org/u/Antomek)
#### Post date: [July 28, 2025, 11:40am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/8 "2025-07-28T11:40:26Z")

</div>

Hmm, somehow this is not working for me.

After following your instructions I get the error

```julia-auto
Client julials quit with exit code 1 and signal 0. Check log for errors:~/.local/state/nvim/lsp.log

```

but nothing even gets written to the log (although `:LspInfo` shows julials to be enabled).

---

<div class="post-metadata">

### Author: ![Antomek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/antomek/32/9406_2.png) [@Antomek](https://discourse.julialang.org/u/Antomek)
#### Post date: [July 28, 2025, 11:54am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/9 "2025-07-28T11:54:34Z")

</div>

It appears that when calling `vim.lsp.enable("julials")`, unless also `vim.lsp.config('julials', { ... })` is called before that, nvim falls back onto the config as stated in `mason-lspconfig`, thereby not resolving the issue.

What I missed was that I also had to uninstall `julials` from Mason, in addition to following danielwe’s instructions.  
Obvious in hindsight, but leaving it here in case someone else makes the same mistake I did.

---

<div class="post-metadata">

### Author: ![danielwe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielwe/32/35657_2.png) [@danielwe](https://discourse.julialang.org/u/danielwe)
#### Post date: [July 28, 2025, 3:53pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/10 "2025-07-28T15:53:54Z")

</div>

> [@Antomek](#):
>
> What I missed was that I also had to uninstall `julials` from Mason

Yes, that’s important! If nvim-lspconfig and mason-lspconfig are both correctly installed, mason-lspconfig’s servers/configs will always take precedence.

---

<div class="post-metadata">

### Author: ![gapato](https://avatars.discourse-cdn.com/v4/letter/g/439d5e/32.png) [@gapato](https://discourse.julialang.org/u/gapato)
#### Post date: [November 3, 2025, 9:52am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/11 "2025-11-03T09:52:07Z")

</div>

I had to add the StaticLint and SymbolServer packages to the nvim-lspconfig env to get the LSP to start.

---

<div class="post-metadata">

### Author: ![J.B](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j.b/32/219271_2.png) [@J.B](https://discourse.julialang.org/u/J.B)
#### Post date: [November 11, 2025, 9:54am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/12 "2025-11-11T09:54:42Z")

</div>

Thanks to @danielwe for the solution. I’ve got LSP working in Lazyvim via the nvim-lspconfig.

As of now I’m still struggling to get SymbolServer to play nice. SymbolServer is restricted to v7.4.0 by LanguageServer’s v.4.5.1, which (according to multiple LLMs interpretation of my LspLog) leads to world-age issues.

## LLM output:

```julia-auto
UndefVarError: `FileIO` not defined

```

and the world-age warning:

```julia-auto
Detected access to binding `LoadingBay.Makie` in a world prior to its definition world.

```

are **SymbolServer.jl world-age bugs under Julia ≥1.11** , especially when SymbolServer is at **v7.x**.

The Julia 1.12 world-age model is stricter, and **SymbolServer v7.4.0** (the one constrained by LanguageServer 4.5.1) doesn’t handle this correctly — it tries to evaluate packages (e.g. `FileIO`, `Makie`) in a `Main` context without proper `invokelatest` protection.  
That causes package indexing to abort → completion for external packages fails.

Does anybody have a working setup for completion of loaded packages?

---

<div class="post-metadata">

### Author: ![DoktorMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/doktormike/32/2736_2.png) [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)
#### Post date: [November 11, 2025, 7:36pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl-crashing-again/130273/13 "2025-11-11T19:36:37Z")

</div>

Yeah I also have this issue and have not been able to resolve it. Haven’t spent much time in it except debugging and finding the world age problem you mention.
