lspsaga.nvim icon indicating copy to clipboard operation
lspsaga.nvim copied to clipboard

Error on first diagnostic check after launch

Open tannerellen opened this issue 3 years ago • 12 comments

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

tannerellen avatar Feb 19 '23 21:02 tannerellen

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.

gonviegas avatar Feb 19 '23 22:02 gonviegas

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.

tannerellen avatar Feb 19 '23 22:02 tannerellen

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)

brendencallahan avatar Feb 19 '23 22:02 brendencallahan

I'm getting the same error as well

noisyBrain avatar Feb 19 '23 22:02 noisyBrain

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

brendencallahan avatar Feb 19 '23 23:02 brendencallahan

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.

gonviegas avatar Feb 19 '23 23:02 gonviegas

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

itsjoeoui avatar Feb 19 '23 23:02 itsjoeoui

@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.

brendencallahan avatar Feb 19 '23 23:02 brendencallahan

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

glepnir avatar Feb 20 '23 00:02 glepnir

@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!

itsjoeoui avatar Feb 20 '23 00:02 itsjoeoui

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

brendencallahan avatar Feb 20 '23 03:02 brendencallahan

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?

noisyBrain avatar Feb 20 '23 03:02 noisyBrain