I would like to create a new highlighting group that is exactly like an existing one except for one (or more) properties. For example, the new group could be an underlined version of the existing one.
Context: I'm using coc.nvim and its semantic highlighting feature. To support the language server protocol's token modifiers, coc.nvim creates combined highlighting groups. For example, CocSemVariable
for immutable variables, and CocSemMutableVariable
for mutable ones. What I would like to do is something like this:
highlight! link CocSemMutableVariable CocSemVariable
highlight! CocSemMutableVariable cterm=underline gui=underline
This doesn't work however since any highlight
command will break links. Is there a way to achieve what I want?