Can you target a spesific line number in the gutter? Let's say I want line 20 in the gutter te be red for some reason. Possible? Like CursorLineNr
, but defining the line number yourself. In short I'm looking to write a simple plugin showing some simple warnings through colours, not relying on the sign column feature. I use Neovim.
Works only in neovim
highlight CustomError ctermfg=red guifg=red
sign define error numhl=CustomError
sign place 2 name=error line=7
Have a look, at :h sign
CursorLineNr
highlight if you don't usecursorline
orrelativenumber
.But if you really need this settings, then you could hack something up so that the line numbers are part of the buffer itself and then you could use typical:h matchadd()
. I mean when you're editing vim will add line numbers to the first column of each lines and when you save you have a keybinding that substitutes it with nothing. But this is a huge overhead! – klaus Mar 7 '19 at 20:09