Hey! I’m currently switching from coc to lsp and it’s doing great so far but something I’d really like in coc was the “gui”, I had the LineNr in the color of the warning and the virtual text only on the current line. I know that this question have already been asked everywhere but none of the answer currently tried have worked for me…
Thank you for your time and have a great day! (:
See :help diagnostic-signs
. You can define the signs with a “numhl”, which tells which highlight group neovim will use for that. You can also set linehl to set a highlight group for the entire line.
For example:
sign define DiagnosticSignError text=E texthl=DiagnosticSignError linehl= numhl=DiagnosticSignError
sign define DiagnosticSignWarn text=W texthl=DiagnosticSignWarn linehl= numhl=DiagnosticSignWarn
sign define DiagnosticSignInfo text=I texthl=DiagnosticSignInfo linehl= numhl=DiagnosticSignInfo
sign define DiagnosticSignHint text=H texthl=DiagnosticSignHint linehl= numhl=DiagnosticSignHint
This will make the line number look like the sign itself. You can also use a different highlight group, of course. If you want to have just the line number highlighted, without any symbols, you can set text=
.
Thank you very much that worked just fine.
If anybody have an idea on how to only show virtual text on current line, I’m open to all suggestions…
Have a great day! (: