Attempt to index field 'capabilities' (a nil value) in nvim
treshenry opened this issue ยท 7 comments
Heya! Got a weird one which may, or may not, actually be NextLS. I just started getting the following error when opening .ex files for the first time in an nvim session:
LSP[NextLS]: Error SERVER_REQUEST_HANDLER_ERROR: "...bIFYr/usr/share/nvim/runtime/lua/vim/lsp/_watchfiles.lua:199: attempt to index field 'capabilities' (a nil value)"
I'm not sure if this is coming from actual code in the repo (the only references to capabilities
I can find are in Phoenix' live_dashboard code) or if this is some combination of tools/config causing an issue.
I'm happy to provide more detail/logs/whatever if someone points me in the right direction. This happens consistently on startup now, so it's an easy repro for me.
Ubuntu 22.04.2 LTS
NVIM v0.9.1
I'm using AstroNvim and my config is here: https://github.com/treshenry/astronvim_config/ particularly https://github.com/treshenry/astronvim_config/blob/main/plugins/elixir-tools.lua which is just a copy/paste from https://github.com/elixir-tools/elixir-tools.nvim ๐คทโโ๏ธ
That exception is from neovim itself, not Next LS or elixir-tools.nvim.
Let me try myself using neovim stable (I run nightly for the most part) to see if I can reproduce.
Also, can you confirm the versions of Next LS and elixir-tools.nvim you are using.
$ pwd
/home/tres/.local/share/nvim/lazy/elixir-tools.nvim
$ cat version.txt
0.6.6
Does that help? It looks like lazy just checks out main, I'm guessing because the config specifies version: "*"
(from the suggested config at https://github.com/elixir-tools/elixir-tools.nvim)
If you open :Lazy
and then find the elixir-tools entry and then hit enter, you'll see something like this
NextLS should be on the latest version, but you can check by looking at the lsp log (or through my output-panel plugin
I replicated it on 0.9.1, might be something that was already fixed on nightly.
i'll try to see if i can fix in the plugin.
also i'm transferring this to the neovim plugin repo
Verified this is fixed in 0.7.1. Woot! ๐