chromatica.nvim
chromatica.nvim copied to clipboard
Highlighting is not updated on viewport change
Hey,
chromatica does not update highlighting when only the viewport is changed (e.g. by pressing zz
or <C-y>
) and the cursor stays in place. Would it maybe be better to call chromatica#handlers#_highlight()
on CursorHold
and not on CursorMoved
? (see handlers.vim)
color_coded calls its update routine on CursorHold
, CursorHoldI
, CursorMoved
and CursorMovedI
(https://github.com/jeaye/color_coded/blob/master/plugin/color_coded.vim#L52). However, binding to insert mode events could be quite slow...
Sure. That is a good idea. I have pushed it to master. I would imagine no big hit on performance. Please try it.
Tried it and works great without any noticeable performance hit. :+1: