# Neovim + LanguageServer.jl

**URL:** <https://discourse.julialang.org/t/neovim-languageserver-jl/37286>\
**Category:** Tooling\
**Tags:** editors\
**Created:** [April 9, 2020, 4:13pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286 "2020-04-09T16:13:25Z")\
**Posts on this page:** 1\
**Showing post:** 72

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [September 27, 2021, 2:30pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/72 "2021-09-27T14:30:39Z")

</div>

### Instant startup with PackageCompiler

LanguageServer is somewhat slow to start so it is very useful to use a custom sysimage using [PackageCompiler](https://github.com/JuliaLang/PackageCompiler.jl) to reduce this time. On my machine I get the first response after 20+ seconds, but with a custom sysimage I can execute LS commands instantaneously.

Here is my setup:

1. Modify [`init.vim`](https://github.com/fredrikekre/.dotfiles/blob/1a6e345f8ff42c42c0869f31bd08ecad968e2b2b/.config/nvim/init.vim#L5-L12) to use a custom Julia executable (if it exist):

2. Utilize this [Makefile](https://github.com/fredrikekre/.dotfiles/blob/1a6e345f8ff42c42c0869f31bd08ecad968e2b2b/.julia/environments/nvim-lspconfig/Makefile).

3. Run `make`. This will set up a dummy project and launch `nvim` with julia recording everything that is compiled. Wait until the LanguageServer responds (there are a bunch of things in this dummy project that will result in warnings) and then run some LanguageServer commands, for example `::lua vim.lsp.buf.hover()` to fetch documentation).

4. Quit nvim.

5. PackageCompiler will now build a custom `languageserver.so` sysimage.

6. Profit.

---

_[View the full topic](https://discourse.julialang.org/t/neovim-languageserver-jl/37286)._
