nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.46k stars 287 forks source link

Error on first diagnostic check after launch #886

Closed tannerellen closed 1 year ago

tannerellen commented 1 year ago

After the latest update to 0.2.7 I get an error the first time LSP saga evaluates a diagnostic issue. Once I dismiss the message everything works as expected and the error will no longer show until I quit neovim and relaunch. This does not happen in older versions of lspsaga.

Neovim 0.8.3 on Ubunutu.

The way I can reproduce this every time is launch neovim, then open a file and type something that is not allowed syntax. For example “$” in a lua file. The error will show immediately. As I said before, once the error is dismissed it will no longer show until neovim is relaunched.

Screenshot 2023-02-19 at 1 05 27 PM

gonviegas commented 1 year ago

Yes. I'm getting the same error and it also gives me the same visual glitches that you're having near the top right corner.

tannerellen commented 1 year ago

Yes. I'm getting the same error and it also gives me the same visual glitches that you're having near the top right corner.

That's my column width indicator in my screenshot at the top right. So it's expected to be there. Haven't dug any further if I'm experiencing more issues than the error message.

brendencallahan commented 1 year ago

image

Along with that error, I am getting these visual glitches. I believe that may be what @gonviegas was referring to. (You would expect this text to be near the error not in the upper right hand corner)

noisyBrain commented 1 year ago

I'm getting the same error as well

brendencallahan commented 1 year ago

I am able to consistently reproduce this by opening a .lua file, waiting for the lus_lsp to finish loading, and entering any character on a new line i.e. "t". Let me know if there is any other info that would help.

image

gonviegas commented 1 year ago

image

Along with that error, I am getting these visual glitches. I believe that may be what @gonviegas was referring to. (You would expect this text to be near the error not in the upper right hand corner)

After I get those glitches, it leaves a visual trail, a column with different background color and characters are not shown. It's like the highlight was deleted for that particular spot.

itsjoeoui commented 1 year ago

second time this week lspsaga breaks after pulling down new updates 😢

brendencallahan commented 1 year ago

@itsjoeoui if you are feeling frustrated by this it is not too difficult to solve. You can either use a package manager like packer to take 'snapshots' of the current plugin's commits or do it manually. In fact, if you would like to remedy this issue right now you can go to ~/.local/share/nvim/site/pack/packer/start/lspsaga.nvim ,or wherever you have lspsaga installed, and just git checkout commithash. I know this isn't ideal but it's just the cost of using plugins.

glepnir commented 1 year ago

first why do not read doc and update pr? set diagnostic.on_insert to false before I fixed

itsjoeoui commented 1 year ago

@itsjoeoui if you are feeling frustrated by this it is not too difficult to solve. You can either use a package manager like packer to take 'snapshots' of the current plugin's commits or do it manually. In fact, if you would like to remedy this issue right now you can go to ~/.local/share/nvim/site/pack/packer/start/lspsaga.nvim ,or wherever you have lspsaga installed, and just git checkout commithash. I know this isn't ideal but it's just the cost of using plugins.

Good idea, thanks!

brendencallahan commented 1 year ago

So it appears you need to either disable diagnostic.on_insert or set DiagnosticInsertDisable. Read more about it from pull request #867

noisyBrain commented 1 year ago

first why do not read doc and update pr? set diagnostic.on_insert to false before I fixed

I tried to solve it by myself, but I guess I'm too noob for that now. When you've fixed how could I figure out how did you solve it? Reading commit diffs maybe?