I am using Neovim 0.8.0-dev, and just recently LSP started to not show me errors with virtual text on the screen. It worked fine before, but now I’m not sure what is causing it to do this. If I update the text somehow, for example by deleting the line directly above/below a line where there should be an error or warning being shown, it will suddenly pop up. Otherwise it will not display the warnings/errors for anything in the file
I have attached my GitHub repo below to my Nvim RC. If anybody can help me fix this problem that would be great. In In my repo, if you navigate to lua/lsp there will be all of my LSPConfig settings.
Fixed. Was using an outdated lsp config.
Do you mind sharing what was the issue exactly? I think I have similar issues and you may be able to help.
Nevermind, I saw your commits to the repo.
I was just going to suggest checking out the commits in my repo. I honestly think my issue may have been a combination of problems. One of those being I was using an outdated lsp-installer config which I have since updated. After making the update to my lsp-installer config I was able to have errors show properly when enabling the update_in_insert option. But I stilled seemed to be having issues with errors when this was set to false (as I liked waiting for errors to be shown after I finish typing the line). After running PackerUpdate this seemed to solve that issue as well.
Hopefully this was able to help you a little bit. I never actually figured out the exact thing that was causing this issue, but updating Packer and making the changes in my repo it solved the issue for me.
Thank you for the reply @kbraggster.
My lsp servers are all up to date. It is so frustrating because I am deep in a coding session and then the errors stop showing up. The only way to have them back is to restart neovim.
I will update if I find the problem. Thank you again.
@drio No problem sorry I couldn’t help more.
If I had any recommendations though, I would try enabling
update_in_insert and set that to true in your config. Maybe this will solve your problem.
You can check in out how implemented all of the lsp error settings in the handlers.lua file in my repo.
Thank you @kbraggster.
I think that was the issue. I spent a couple of hours doing the work and trying to understand a little bit better how the lsp client within neovim works.
Now things work beautifully.
This is a great reference BTW: Neovim Builtin LSP Setup Guide - YouTube
@drio Awesome! I’m glad you were able to get it figured out! Nvim can definitely be a hassle sometimes (sometimes more than it’s worth). I will definitely check out that reference too.