There's no way to do this directly with highlight!
since links and groups are fundamentally different. You can have a highlight that is a link or a highlight with properties, you can't have both.
Instead you can try to use hlget
and hlset
as follows:
let resolve = v:true " set to v:false if not wanting to resolve links
let hl = hlget('CocSemVariable', resolve)[0]
let hl.name = 'CocSemMutableVariable'
let hl.cterm = {'underline': v:true}
let hl.gui = {'underline': v:true}
call hlset([hl])
Of course, this is not a real link and vim is not blending anything. If you modify CocSemVariable
, these changes will not appear in CocSemMutableVariable
. You can mitigate this to some extent via
function! Tweaks()
... code from above ...
endfunction
au ColorScheme * call Tweaks()
So that when groups are changed through changing colorschemes (the usual situation), the dependent groups are automatically updated.