# 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:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![mike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike/32/39_2.png) [@mike](https://discourse.julialang.org/u/mike)\
**Post date:** [July 17, 2021, 7:51am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/62 "2021-07-17T07:51:11Z")

</div>

@fredrikekre has updated the default `nvim-lspconfig` for Julia [[julia] improvements to current project detection. by fredrikekre · Pull Request #1079 · neovim/nvim-lspconfig · GitHub](https://github.com/neovim/nvim-lspconfig/pull/1079), which should, hopefully 🤞, work better out-of-the-box now for everyone.

---

<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:** [August 17, 2021, 3:46pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/63 "2021-08-17T15:46:00Z")

</div>

[neovim/nvim-lspconfig#1153](https://github.com/neovim/nvim-lspconfig/pull/1153) is merged now so things should work out of the box if you:

1. Install `LanguageServer` in the shared environment `~/.julia/environments/nvim-lspconfig`:

```nohighlight
$ julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.add("LanguageServer")'

```

2. Enable it in `init.lua`:

```julia
require'lspconfig'.julials.setup{}

```

or `init.vim`:

```julia
lua << EOF
require'lspconfig'.julials.setup{}
EOF

```

---

<div class="post-metadata">

**Author:** ![Storopoli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/storopoli/32/209278_2.png) [@Storopoli](https://discourse.julialang.org/u/Storopoli)\
**Post date:** [September 4, 2021, 11:54pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/64 "2021-09-04T23:54:47Z")

</div>

I’ve set up everything as @fredrikekre described. LSP takes up to 2 min to start working.

I keep getting these errors `.cache/nvim/lsp.log`:

Can anyone shed a light?

```julia
[START] 2021-09-04T19:55:02-0300 ] LSP logging initiated
[START] 2021-09-04T20:51:37-0300 ] LSP logging initiated
[ERROR] 2021-09-04T20:51:38-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	'┌ Info: Running language server\n│ VERSION = v"1.6.2"\n│ pwd() = "/home/storopoli/Desktop"\n│ project_path = "/home/storopoli/.julia/environments/v1.6"\n└ depot_path = ""\n'
[ERROR] 2021-09-04T20:51:51-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Cloud was unable to cache Qt5Base_jll in the past, we won't try to retrieve it again.\n"
[ERROR] 2021-09-04T20:51:51-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Couldn't retrieve cache file for JuliaInterpreter.\n"
[ERROR] 2021-09-04T20:51:51-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Couldn't retrieve cache file for FuzzyCompletions.\n"
[ERROR] 2021-09-04T20:51:51-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Couldn't retrieve cache file for OpenBLAS_jll.\n"
[ERROR] 2021-09-04T20:51:51-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Couldn't retrieve cache file for IndirectArrays.\n"
[ERROR] 2021-09-04T20:51:51-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Couldn't retrieve cache file for LibSSH2_jll.\n"
[ERROR] 2021-09-04T20:51:51-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Cloud was unable to cache Wayland_jll in the past, we won't try to retrieve it again.\n"
[ERROR] 2021-09-04T20:51:51-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Couldn't retrieve cache file for LoweredCodeUtils.\n"
[ERROR] 2021-09-04T20:51:51-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Couldn't retrieve cache file for TableOperations.\n"
[ERROR] 2021-09-04T20:51:51-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Couldn't retrieve cache file for MeshIO.\n"
[ERROR] 2021-09-04T20:51:53-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Couldn't retrieve cache file for SentinelArrays.\n"
[ERROR] 2021-09-04T20:51:53-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Couldn't retrieve cache file for GR_jll.\n"
[ERROR] 2021-09-04T20:51:53-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Couldn't retrieve cache file for PNGFiles.\n"
[ERROR] 2021-09-04T20:52:00-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: SentinelArrays not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-04T20:52:04-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: LibSSH2_jll not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-04T20:52:07-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: LoweredCodeUtils not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-04T20:52:07-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: JuliaInterpreter not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-04T20:52:10-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: TableOperations not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-04T20:52:10-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: OpenBLAS_jll not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-04T20:52:11-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: GR_jll not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-04T20:52:12-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: PNGFiles not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-04T20:52:13-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: FuzzyCompletions not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-04T20:52:14-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: MeshIO not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-04T20:52:15-0300 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Received new data from Julia Symbol Server.\n"

```

---

<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 4, 2021, 11:56pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/65 "2021-09-04T23:56:31Z")

</div>

Does it work after those 2 minutes though? That log looks perfectly normal.

---

<div class="post-metadata">

**Author:** ![Storopoli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/storopoli/32/209278_2.png) [@Storopoli](https://discourse.julialang.org/u/Storopoli)\
**Post date:** [September 5, 2021, 12:02am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/66 "2021-09-05T00:02:52Z")

</div>

Yes it does. Perfectly though!

Is that the expected behavior? What is going on in the log? Why so many errors?

---

<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 5, 2021, 12:06am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/67 "2021-09-05T00:06:29Z")

</div>

There are only info and warning messages there (although they are printed to stderr, so looks like nvim prepends ERROR).

---

<div class="post-metadata">

**Author:** ![alonsoC1s](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alonsoc1s/32/25819_2.png) [@alonsoC1s](https://discourse.julialang.org/u/alonsoC1s)\
**Post date:** [September 22, 2021, 5:08pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/68 "2021-09-22T17:08:17Z")

</div>

I’ve also set everything up following @fredrikekre 's instructions and things work without too much effort. But like @Storopoli my LSP takes upwards of 2 min to work at all. I’ve also looked at the logs and get pretty much the same thing. I include a small excerpt below:

```julia
[ERROR] 2021-09-22T11:53:19-0500 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: LibSSH2_jll not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-22T11:53:19-0500 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: MbedTLS_jll not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-22T11:53:22-0500 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: LoweredCodeUtils not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-22T11:53:37-0500 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: Rmath not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-22T11:53:54-0500 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: MKL_jll not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-22T11:53:54-0500 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: OpenBLAS_jll not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-22T11:54:02-0500 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: XSLT_jll not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-22T11:54:45-0500 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: Lz4_jll not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-22T11:54:49-0500 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"┌ Warning: ZeroMQ_jll not stored on disc\n└ @ SymbolServer ~/.julia/packages/SymbolServer/rrlGM/src/SymbolServer.jl:192\n"
[ERROR] 2021-09-22T11:54:57-0500 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:462 ]	"rpc"	"julia"	"stderr"	"[ Info: Received new data from Julia Symbol Server.\n"

```

The thing is, this happens every time I load a Julia file. It’s not just the first compilation, it takes minutes every single time to start up. I really hope there is a fix for this otherwise I don’t think I can use LSP yet

---

<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:** [September 22, 2021, 5:35pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/69 "2021-09-22T17:35:38Z")

</div>

When I run this setup my LS only picks up the packages installed in the language server environment instead of looking for the packages installed in the environment I’m developing in. Is this intentional and is everyone else seeing the same thing?

---

<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 22, 2021, 11:45pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/70 "2021-09-22T23:45:45Z")

</div>

No, that seems weird. Are you on the latest version of nvim-lspconfig?

---

<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:** [September 23, 2021, 7:02am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/71 "2021-09-23T07:02:16Z")

</div>

I am, but i also recently migrated my nvim configuration to pure Lua script so i could very well have messed something up in my settings. I will continue to dig into it but good to know that it’s working as i hoped. I’ll ping back when i locate the issue. 🙂

---

<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.

---

<div class="post-metadata">

**Author:** ![kdheepak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kdheepak/32/10881_2.png) [@kdheepak](https://discourse.julialang.org/u/kdheepak)\
**Post date:** [September 28, 2021, 4:44pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/73 "2021-09-28T16:44:35Z")

</div>

> [@fredrikekre](#):
>
> ```julia
> require'lspconfig'.julials.setup{
> on_new_config = function(new_config, _)
> local julia = vim.fn.expand("~/.julia/environments/nvim-lspconfig/bin/julia")
> if require'lspconfig'.util.path.is_file(julia) then
> new_config.cmd[1] = julia
> end
> end
> }
> 
> ```

I’m getting an error when I use your `Makefile`:

 ![Screen Shot 2021-09-28 at 10.34.12 AM](https://global.discourse-cdn.com/julialang/original/3X/2/7/27dfecfe13f497571829927a5a667b22d24ce956.jpeg)

If I comment these lines:

```julia
  -- on_new_config = function(new_config, _)
  -- local julia = vim.fn.expand("~/.julia/environments/nvim-lspconfig/bin/julia")
  -- if require("lspconfig").util.path.is_file(julia) then
  -- print(julia)
  -- new_config.cmd[1] = julia
  -- end
  -- end,

```

I don’t get the above error. This is the contents of `nvim-lspconfig/bin/julia`:

```julia
#!/bin/bash
JULIA=/Users/USER/Applications/Julia-nightly.app/Contents/Resources/julia/bin/julia --startup-file=no
if [[${JULIA_TRACE_COMPILE} = "1"]]; then
    exec ${JULIA} --trace-compile=/Users/USER/.julia/environments/nvim-lspconfig/packagecompiler/precompile_statements.jl "$@"
elif [[-f /Users/USER/.julia/environments/nvim-lspconfig/languageserver.dylib]]; then
    exec ${JULIA} --sysimage=/Users/USER/.julia/environments/nvim-lspconfig/languageserver.dylib "$@"
else
    exec ${JULIA} "$@"
fi

```

I had to add the `--startup-file=no` flag. Any idea what might be going on?

---

<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 29, 2021, 8:29am UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/74 "2021-09-29T08:29:26Z")

</div>

Strange. My snippet to replace the julia executable should only swap [https://github.com/neovim/nvim-lspconfig/blob/9ca394ec3a9305a6c30018ee6f731c9b23a4b25e/lua/lspconfig/julials.lua#L5](https://github.com/neovim/nvim-lspconfig/blob/9ca394ec3a9305a6c30018ee6f731c9b23a4b25e/lua/lspconfig/julials.lua#L5) and `--startup-file=no` should still be there: [https://github.com/neovim/nvim-lspconfig/blob/9ca394ec3a9305a6c30018ee6f731c9b23a4b25e/lua/lspconfig/julials.lua#L6](https://github.com/neovim/nvim-lspconfig/blob/9ca394ec3a9305a6c30018ee6f731c9b23a4b25e/lua/lspconfig/julials.lua#L6)

---

<div class="post-metadata">

**Author:** ![davibarreira](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davibarreira/32/20270_2.png) [@davibarreira](https://discourse.julialang.org/u/davibarreira)\
**Post date:** [December 15, 2021, 5:50pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/75 "2021-12-15T17:50:13Z")

</div>

@fredrikekre it seems that your Makefile is not working anymore with Julia 1.7 😢  
I’m guessing the issue is actually PackageCompiler.jl. I get an error when trying to create the image:

```julia
ERROR: failed process: Process(`/opt/julia-1.7.0/bin/julia --color=auto --startup-file=no --cpu-target=native -O3 --sysimage=/opt/julia-1.7.0/lib/julia/sys.so --project=/home/davibarreira/.julia/environments/nvim-lspconfig --output-o=/tmp/jl_w7PlW2.o /tmp/jl_NrvF7t`, ProcessExited(1)) [1]

```

---

<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:** [December 15, 2021, 10:31pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/76 "2021-12-15T22:31:41Z")

</div>

Works perfectly fine for me on both Linux and macOS with Julia 1.7. I made some updates to it ([current version is here](https://github.com/fredrikekre/.dotfiles/blob/master/.julia/environments/nvim-lspconfig/Makefile)), but that was only to make it work on macOS, it worked before that change on Linux for me.

---

<div class="post-metadata">

**Author:** ![devmotion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devmotion/32/9201_2.png) [@devmotion](https://discourse.julialang.org/u/devmotion)\
**Post date:** [December 16, 2021, 3:40pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/77 "2021-12-16T15:40:24Z")

</div>

Works fine for me as well. I installed LanguageServer#master in the `.julia/environments/nvim-lspconfig` environment ([many features and fixes are missing in the latest release from July](https://github.com/julia-vscode/LanguageServer.jl/issues/998)) and otherwise followed [@fredrikekre’s instructions](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/63).

---

<div class="post-metadata">

**Author:** ![davibarreira](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davibarreira/32/20270_2.png) [@davibarreira](https://discourse.julialang.org/u/davibarreira)\
**Post date:** [December 17, 2021, 11:13pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/78 "2021-12-17T23:13:11Z")

</div>

I keep getting this error ☹

```julia
⠸ [00m:14s] PackageCompiler: compiling incremental system imageSystemError: opening file "/home/davibarreira/.julia/environments/nvim-lspconfig/packagecompiler/precompile_statements.jl": No such file or directory
Stacktrace:
⡆ [00m:14s] PackageCompiler: compiling incremental system imageString, errno::Int32; extrainfo::Nothing)
    @ Base ./error.jl:174
  [2] #systemerror#68
    @ ./error.jl:173 [inlined]
  [3] systemerror
    @ ./error.jl:173 [inlined]
  [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
    @ Base ./iostream.jl:293
  [5] open
    @ ./iostream.jl:282 [inlined]
  [6] #eachline#390
    @ ./io.jl:1014 [inlined]
  [7] eachline(filename::String)
    @ Base ./io.jl:1014
  [8] top-level scope
    @ /tmp/jl_GltfQx:73
  [9] eval(m::Module, e::Any)
    @ Core ./boot.jl:373
 [10] top-level scope
    @ /tmp/jl_GltfQx:61
in expression starting at /tmp/jl_GltfQx:61
⠋ [00m:15s] PackageCompiler: compiling incremental system image
ERROR: failed process: Process(`/opt/julia-1.7.0/bin/julia --color=auto --startup-file=no --cpu-target=native -O3 --sysimage=/opt/julia-1.7.0/lib/julia/sys.so --project=/home/davibarreira/.julia/environments/nvim-lspconfig --output-o=/tmp/jl_Lok4MU.o /tmp/jl_GltfQx`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ ./process.jl:531 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:446
 [3] run
   @ ./process.jl:444 [inlined]
 [4] #14
   @ ~/.julia/packages/PackageCompiler/tdgyo/ext/TerminalSpinners.jl:157 [inlined]
 [5] spin(f::PackageCompiler.var"#14#15"{Cmd}, s::PackageCompiler.TerminalSpinners.Spinner{Base.TTY})
   @ PackageCompiler.TerminalSpinners ~/.julia/packages/PackageCompiler/tdgyo/ext/TerminalSpinners.jl:164
 [6] macro expansion
   @ ~/.julia/packages/PackageCompiler/tdgyo/ext/TerminalSpinners.jl:157 [inlined]
 [7] create_sysimg_object_file(object_file::String, packages::Vector{String}, packages_sysimg::Set{Base.PkgId}; project::String, base_sysimage::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, extra_precompiles::String)
   @ PackageCompiler ~/.julia/packages/PackageCompiler/tdgyo/src/PackageCompiler.jl:356
 [8] create_sysimage(packages::Symbol; sysimage_path::String, project::String, precompile_execution_file::Vector{String}, precompile_statements_file::String, incremental::Bool, filter_stdlibs::Bool, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, include_transitive_dependencies::Bool, base_sysimage::Nothing, julia_init_c_file::Nothing, version::Nothing, soname::Nothing, compat_level::String, extra_precompiles::String)
   @ PackageCompiler ~/.julia/packages/PackageCompiler/tdgyo/src/PackageCompiler.jl:507
 [9] top-level scope
   @ none:1
make: *** [Makefile:6: languageserver.so] Error 1

```

---

<div class="post-metadata">

**Author:** ![davibarreira](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davibarreira/32/20270_2.png) [@davibarreira](https://discourse.julialang.org/u/davibarreira)\
**Post date:** [December 17, 2021, 11:30pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/79 "2021-12-17T23:30:35Z")

</div>

@devmotion , the Lsp works, but not the sysimage script in the Makefile. Did you also follow the instructions for creating the image sys?

---

<div class="post-metadata">

**Author:** ![devmotion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devmotion/32/9201_2.png) [@devmotion](https://discourse.julialang.org/u/devmotion)\
**Post date:** [December 17, 2021, 11:38pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/80 "2021-12-17T23:38:23Z")

</div>

Yes, I did. I actually followed [these instructions](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/72), seems unfortunately I copied the wrong link in my comment above.

---

<div class="post-metadata">

**Author:** ![davibarreira](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davibarreira/32/20270_2.png) [@davibarreira](https://discourse.julialang.org/u/davibarreira)\
**Post date:** [December 18, 2021, 1:53pm UTC](https://discourse.julialang.org/t/neovim-languageserver-jl/37286/81 "2021-12-18T13:53:10Z")

</div>

My julia setup is brand new, since I just changed to 1.7. It had worked before, with my previous version 😕

[Previous page](https://discourse.julialang.org/t/neovim-languageserver-jl/37286.md?page=3)

[Next page](https://discourse.julialang.org/t/neovim-languageserver-jl/37286.md?page=5)
