]> git.r.bdr.sh - rbdr/dotfiles/blame - vim/autoload/syntastic.vim
Add vim-json bundle
[rbdr/dotfiles] / vim / autoload / syntastic.vim
CommitLineData
0d23b6e5
BB
1
2function! syntastic#ErrorBalloonExpr()
3 if !exists('b:syntastic_balloons') | return '' | endif
4 return get(b:syntastic_balloons, v:beval_lnum, '')
5endfunction
6
7function! syntastic#HighlightErrors(errors, termfunc, ...)
8 call clearmatches()
9 let forcecb = a:0 && a:1
10 for item in a:errors
11 let group = item['type'] == 'E' ? 'SpellBad' : 'SpellCap'
12 if item['col'] && !forcecb
13 let lastcol = col([item['lnum'], '$'])
14 let lcol = min([lastcol, item['col']])
15 call matchadd(group, '\%'.item['lnum'].'l\%'.lcol.'c')
16 else
17 let term = a:termfunc(item)
18 if len(term) > 0
19 call matchadd(group, '\%' . item['lnum'] . 'l' . term)
20 endif
21 endif
22 endfor
23endfunction
24