Closed usaoc closed 3 years ago
Thx!
Hi, the other hi
commands should be changed to hi def
as well, otherwise it would still override custom highlight group definitions everytime set ft=asciidoctor
is executed. The augroup should be removed altogether, as the only thing it does is executing hi
command when users change a colorscheme, which is not needed given hi def
.
Well, autocommand was added to mitigate issue with vim (unable to properly clean highlights and restore default links) and colorscheme changes.
Basically, if you have stable vim, you would be able to reproduce it having **bold**
text and changing colorscheme to elflord
or any other default colorschemes.
Anyway, the issue in vim dev is fixed (not 100%, for our case you would still need to :syn on
after colorscheme change to reapply default asciidoctorBold/Italic), so I will remove autocommand.
Interesting, never realized that. But I still think the definitions should be done colorscheme-wise. Anyway, thanks :)
for reference: https://github.com/vim/vim/issues/4405
Hi. It seems like that the syntax file includes an augroup which overrides colorscheme highlight groups even when they are set in the colorscheme. https://github.com/habamax/vim-asciidoctor/blob/f39d17a893c14aefcfed47f7ef3252e057f5c514/syntax/asciidoctor.vim#L286-L291 Preferably this should be done by
hi def link
, like what themarkdown.vim
file that ships with vim does. That way, users can define their own highlighting forasciidoctorItalic
andasciidoctorBoldItalic
. This is useful when users use a font without italics definition. Thanks.