dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

lsp: Diagnostics, wanted display

Open bew opened this issue 4 years ago • 4 comments

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:

  • ! -> only 1+ warnings on the line
  • x -> 1+ errors and maybe 1+ warnings on the line
  • x? (or not?) -> 1+ errors and maybe 1+ warnings and 1+ hints on the line NOTE(fixme?): I think it's not possible to highlight the 2 chars of a sign differently.. So maybe ONLY show error-or-warning? hints can be left ONLY in virtual text.

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 avatar Dec 06 '21 20:12 bew

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 avatar Jan 08 '22 01:01 bew

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 avatar Jan 10 '22 16:01 bew

ᕕ( ᐛ )ᕗ

bew avatar Jan 19 '22 12:01 bew

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

bew avatar Jan 06 '23 10:01 bew