I want to remove the background of an existing highlight group using Lua API. It seems that nvim_set_hl
completely replaces the definition (as from the help docs below). Does this mean that I’ll have to use nvim_get_hl_by_name
to fetch the current attributes and update those before passing them into nvim_set_hl
? Just wondering if this is what the Vimscript :highlight
does as well and whether there are better solutions to this.
Note: Unlike the `:highlight` command which can update a
highlight group, this function completely replaces the
definition. For example: `nvim_set_hl(0, 'Visual', {})` will
clear the highlight group 'Visual'.