Checker d/dscanner: add syntax highlighting.

This commit is contained in:
LCD 47 2017-03-30 18:31:58 +03:00
parent 75180daad7
commit b2b125cfad
2 changed files with 6 additions and 1 deletions

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START lockvar! g:_SYNTASTIC_START
endif endif
let g:_SYNTASTIC_VERSION = '3.8.0-34' let g:_SYNTASTIC_VERSION = '3.8.0-35'
lockvar g:_SYNTASTIC_VERSION lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1 " Sanity checks {{{1

View File

@ -18,6 +18,11 @@ let g:loaded_syntastic_d_dscanner_checker = 1
let s:save_cpo = &cpo let s:save_cpo = &cpo
set cpo&vim set cpo&vim
function! SyntaxCheckers_d_dscanner_GetHighlightRegex(i)
let term = matchstr(a:i['text'], '\m^.\{-}''\zs\S\+\ze''')
return term !=# '' ? '\V\<' . escape(term, '\') . '\>' : ''
endfunction
function! SyntaxCheckers_d_dscanner_GetLocList() dict function! SyntaxCheckers_d_dscanner_GetLocList() dict
let makeprg = self.makeprgBuild({ let makeprg = self.makeprgBuild({
\ 'args_after': '--report', \ 'args_after': '--report',