ggandor / lightspeed.nvim

deprecated in favor of leap.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing highlighting colors

w-cantin opened this issue · comments

I was wondering how one can modify the highlight colors and particularly change the background color of the Shortcut labels. I read the documentation and I think that it is related to lightspeed-highlighting and the LightspeedShortcut part in the :help section but it is not clear how to use it. Thank you!

I would just direct you to :help :highlight, but that is not the most well-written and well-structured part of the Vim docs unfortunately. Long story short, defining - or modifying - a highlight group (a collection of highlight/color properties that can be applied to different entities in the buffer) works via the following command (in vanilla Vimscript, not Lua):

:highlight [name-of-group] guibg=[background-color] guifg=[foreground-color] gui=[spec. attributes like bold or underline, separated by commas]

Such groups are already defined by the Lightspeed plugin, and assigned to the corresponding items (these are the groups that are listed under :h lightspeed-highlight). You could change the properties of any of them (i.e. redefine them) by invoking the :highlight command again, e.g.:

:highlight LightspeedShortcut guibg=#f00077 guifg=#ffffff gui=bold,underline

If you have any more questions, feel free to ask here.

This is perfect. Thank you very much for the answer and the great software you built!