nvim-tree.lua icon indicating copy to clipboard operation
nvim-tree.lua copied to clipboard

Collected Diagnostic Sign Issues

Open alex-courtis opened this issue 2 years ago • 11 comments

There are some issues with diagnostic sign visibility and correctness at fd2332a

Collect any bugs discovered in here.

I have seen some sporadic problems with signs not updating, however I have not been able to reproduce.

alex-courtis avatar Apr 30 '22 04:04 alex-courtis

#1157 (#1174) has been resolved

alex-courtis avatar Apr 30 '22 04:04 alex-courtis

#1213 has been raised however has no reproducer

Update: not an nvim-tree bug

alex-courtis avatar Apr 30 '22 04:04 alex-courtis

I think we could move the diagnostics update into the renderer actually, it'd be less inaccurate.

kyazdani42 avatar Apr 30 '22 10:04 kyazdani42

I think we could move the diagnostics update into the renderer actually, it'd be less inaccurate.

Yes.

Having the renderer able to render indicators in the signs column would be useful: we could then put other indicators e.g. git in there.

alex-courtis avatar May 01 '22 02:05 alex-courtis

There are timing issues with diagnostics, that we don't see with other signs e.g. git. The diagnostics are often not updated until after the tree is rendered. This is a poor user experience.

We are able to handle git changes perfectly as we are reacting to all events that cause changes to git signs e.g. buffer writes. Diagnostics are lazy and late.

Improvement: Render the diagnostics upon change, rather than just on tree render. For nvim lsp we can use vim.lsp.diagnostic.on_publish_diagnostics For coc we can use the CocDiagnosticChange autocommand; there is no lua api

alex-courtis avatar May 02 '22 04:05 alex-courtis

#1243 updates on CocDiagnosticChange

alex-courtis avatar May 08 '22 06:05 alex-courtis

During this week, i've experienced a few diagnostics issues, using the default lsp diagnostics provided by neovim. I had to manually refresh the tree because the diagnostics where not updated. I'm not sure where this comes from, but i hope i can reproduce this more consistently.

kyazdani42 avatar May 21 '22 10:05 kyazdani42

I had to manually refresh the tree because the diagnostics where not updated

We are using the DiagnosticChanged for lsp updates. vim.lsp.diagnostic.on_publish_diagnostics may provide more consistent timings and perhaps even allow us to see atomic updates.

Coc has no option but the CocDiagnosticChange event.

alex-courtis avatar May 22 '22 02:05 alex-courtis

ah i didn't know they added this method. I'll take a look at that.

kyazdani42 avatar May 22 '22 11:05 kyazdani42

@kyazdani42 Is this worked on, or a separate issue created? If it is not worked on, I think I can try to work on it because it is bothering me. :)

crosscode-nl avatar Aug 11 '22 11:08 crosscode-nl

@kyazdani42 Is this worked on, or a separate issue created? If it is not worked on, I think I can try to work on it because it is bothering me. :)

#1430 added throttling (debouncing) and some additional safety to diagnostics.

Your assistance would be gratefully appreciated. Migration to vim.lsp.diagnostic.on_publish_diagnostics could prove very useful.

alex-courtis avatar Aug 14 '22 02:08 alex-courtis

Diagnostics appear stable and are no longer causing performance issues as they are debounced.

Please raise a new bug report if you encounter any problems.

alex-courtis avatar Oct 16 '22 00:10 alex-courtis