ledger/vim-ledger

Syntax highlighting overrides the user's colorscheme

ajgrf opened this issue · 1 comments

ajgrf commented

The few instances of syntax highlighting defined in ftplugin/ledger.vim seem to override the user's colorscheme. The main syntax highlighting file syntax/ledger.vim is fine.

These appear to be the problematic lines, I think because of the exclamation:

hi! link LedgerNumber Number
hi! link LedgerNegativeNumber Special
hi! link LedgerCleared Constant
hi! link LedgerPending Todo
hi! link LedgerTarget Statement
hi! link LedgerImproperPerc Special

For example, I added the following line to my colorscheme:

highlight LedgerNegativeNumber ctermfg=1 guifg=#880000

But it gets overridden by vim-ledger.

I would expect that this can be fixed by replacing hi! with highlight default, but a cursory test did not produce the desired behavior. Maybe you can experiment and come up with a patch?