In this plugin for (soft-)wrapping only the current line, I have defined a highlight group, au ColorScheme * hi SoftWrapHighlightGroup ctermbg=NONE ctermfg=NONE
, which I use here as an argument to a call to popup_create
.
How can I let the user alter SoftWrapHighlightGroup
? Also, where should they set it?
I thought default
was the key, but I've not really understood how to use it.
As regards where the user of the plugin would make the change, I think it should be in the vimrc, because it's not a filetype-specific syntax highlighting. It's not a syntax highlighting at all. In this regards, I'm now thinking I should probably have the :highlight
command above not in the :autocmd
at all.
Indeed, with
hi default SoftWrapHighlightGroup ctermbg=NONE ctermfg=NONE cterm=bold
in my plugin, I do see the effect of cterm=bold
, but I'm sure I've read in several places that I should put highlight
commands in an autocmd
. Does it apply here?