rhysd / vim-grammarous

A powerful grammar checker for Vim using LanguageTool.
1.1k stars 41 forks source link

Different background colors for vim spellang and grammarous #88

Open francozappa opened 4 years ago

francozappa commented 4 years ago

Hi,

Is there a way to set the background color of a grammarous errors? E.g., set grammarous background to dark orange and keep the red background for spellang?

rddunphy commented 3 years ago

I know I'm a year late, but in case anyone else comes across this...

You can set a highlight group for GrammarousError, which by default gets aliased to SpellBad. So, the following sets red undercurls for spelling, and green undercurls for grammar (probably need to set foreground colour to work in terminals):

augroup spellhighlighting
    autocmd!
    autocmd ColorScheme * highlight SpellBad guifg=NONE guibg=NONE gui=undercurl guisp=#FF0000
    autocmd ColorScheme * highlight GrammarousError guifg=NONE guibg=NONE gui=undercurl guisp=#00FF00
augroup END