Closed ner0-m closed 3 years ago
Thanks @babariviere for the quick PR! (and @tjdevries for the quick merge)
@ner0-m, does this resolve your problem?
Hey there! I'm not OP but I am also getting a similar error. That is, after updating the plugin with the included merge #18
Error executing lua ...lsp-status.nvim/lua/lsp-status/diagnostics.lua:12: attempt to index field 'diagnostic' (a nil value)
@creativenull You need to upgrade to the latest version of nightly neovim 😄
Oops you're right, I took the easy way out (installed via appimage, 2 days old 😅) and didn't see that it was related to a recently updated nightly.
Let me make a build from source and report back...
@ner0-m, @rockerBOO
vim.lsp.diagnostic.get_count
takes a buffer number before the severity.
Wouldn't it need to be changed to
result[k] = vim.lsp.diagnostic.get_count(0, level)
to get the count for the current buffer?
@jasonrhansen: Nice catch; you're correct. Addressed in 9750f45.
@wbthomason Thanks I just tried and it seems to work perfectly fine! Then this can be closed :smile:
As neovim/neovim#12655 was merged and using neovim with it, I get the following:
With my function to update the statusline being:
The error seems to be in
lsp-status/diagnostics.lua:11
Changing it to:fixes my error.