Closed jamestrew closed 1 year ago
Looking at the error message and your description of the error, I highly doubt your issue has anything to do with this plugin. Seems like either the runtime module in core is neglecting to do a nil check, or the server capabilities is not following the spec. I would open an issue upstream.
Got it thanks. I'll report this upstream.
Howdy :wave:
I've been getting this error message when using
Diffview
:LSP[lua_ls]: Error SERVER_REQUEST_HANDLER_ERROR: "...local/share/nvim/runtime/lua/vim/lsp/semantic_tokens.lua:253: attempt to index field 'semanticTokensProvider' (a nil value)"
I've only started usingDiffview
over frequently and I know lsp semantic highlighting is fairly new feature on neovim nightly and so maybe this is more of a neovim core issue but I want to bring this to your attention.This only occurs when you disable semantic highlighting in your lsp config - more details below. Reproduce-ability of this bug is a little finicky and feels like it's maybe a timing issue between when lsp loads vs when the
Diffview
buffers are opened. That said I've found a way to reliably reproduce this using a slightly "non-typical" workflow.Here are the details:
Neovim version:
I've experienced this on older versions of 0.9 nightly as well.
System info
Linux archlinux 6.1.11-arch1-1
Minimal config
Settings up
Diffview
andlspconfig
- usinglua_ls
as an example as it supports semantic tokens. Note the setting ofsemanticTokensProvider = nil
in theon_attach
function. I believe this is the recommended way to disable semantic tokens. Commenting this line out resolves this issue.Steps to reproduce
mkdir -p /tmp/testing
cd /tmp/testing
git init
touch min.lua
and paste in the minimal config from abovenvim -nu min.lua
and confirm minimal config is working (including the lua lsp)nvim -nu min.lua "+DiffviewOpen"
Expected behavior
observer no lsp errors
Let me know if you would like any additional details. I'm curious if other have experienced this as well.