kristijanhusak / neovim-config

Neovim configuration
254 stars 39 forks source link

Oddly enough; this function call results in diagnostics from _other_ buffers... super strange. #9

Closed megalithic closed 2 years ago

megalithic commented 2 years ago

https://github.com/kristijanhusak/neovim-config/blob/96493d7e9b07bcdbe566865df13ede7815baf671/nvim/lua/partials/lsp.lua#L165

On CursorHold virtual text being shown for the given line is for other diagnostics buffers instead of the current buffer. Using a nearly identical autocmd as yours; trying it both in the client on_attach, and just on my lsp module load.

Wondering if you've ever run across this/that.

Thanks for all of your contributions to nvim!

kristijanhusak commented 2 years ago

I did notice some strange errors lately, and completely randomly. I thought it's the issue with the diagnosticls/eslint, but buffer could be the issue. I'll check it out, thanks!

megalithic commented 2 years ago

Glad you've experienced something similar; i love your implementation; it's super clean.

kristijanhusak commented 2 years ago

I did some changes to the latest master that should fix this. They are changing diagnostics on latest master which I use, and api got deprecated for some of the things. It's a bit uglier now but it works for me.

kristijanhusak commented 2 years ago

I got the latest changes from here https://github.com/neovim/neovim/pull/15717#issuecomment-925803755. For me it works well on latest master. Hope it works for you too!