bew / dotfiles

All my dotfiles in one place!
43 stars 3 forks source link

lsp: Diagnostics, wanted display #80

Open bew opened 2 years ago

bew commented 2 years ago

With LanguageClient_neovim, the display looks like this: image :point_right: Hard to read!!!!!! :point_left: It hides git-gutter's info when there's more than 1 diagnostic on a line. In addition, the sign column appear ONLY when there's 1+ diagnostic on the currently visible lines. => It's very annoying when scrolling to see the sign column appearing and disappearing..

With jedi-vim (not LSP), the display is more subtle, the sign column is persistent (even if no lines with diagnostic currently visible), and the virtual text is visible ONLY for the current line :+1:.


Wanted

In sign column area

Use a single sign for diagnostic: <error-or-warning><hint?> So:

In virtual text area

Multiple display format here, with a keybind to cycle between them.

F1: Subtle indicator (by default): Use a subtle indicator, aligned to the right (?) (after the 100th column?) Similar to :point_down: to indicate the various diagnostics on the line: image Or with text? (!x!!x -> warn then err then warn then warn then err) Or by numbers? (2! 3x h -> 2 warns, 3 errs, 1 hint))

F2: First error or warning or hint message on current line only. F3: First error or warning or hint message on all lines with 1+ diagnostics.

bew commented 2 years ago

https://git.sr.ht/~whynothugo/lsp_lines.nvim uses virtual lines, this is interesting! Maybe a single virtual line with a count of errors of the line, ability to cycle (?) or only an info line, kind of like F3 above?

bew commented 2 years ago

https://github.com/bew/dotfiles/issues/37#issuecomment-1009033675 mentions that https://github.com/petertriho/nvim-scrollbar can now display basic information for the whole file.

We could show where the diagnostics are in the file (roughly). However when a search is in progress, the indicators for search results would take precedence.

bew commented 2 years ago

ᕕ( ᐛ )ᕗ

bew commented 1 year ago

With upcoming statuscolumn (https://github.com/neovim/neovim/pull/20621) we'll get better control on the 'gutter' 😍