Skip to content

Commit 3bb0f3d

Browse files
committed
syntastic config
1 parent 54fa8a0 commit 3bb0f3d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

syntax_checkers/golo/golo.vim

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
"
2+
" Syntastic Golo syntax checker
3+
"
4+
5+
if exists("g:loaded_syntastic_golo_golo_checker")
6+
finish
7+
endif
8+
9+
let g:loaded_syntastic_golo_golo_checker = 1
10+
11+
let s:save_cpo = &cpo
12+
set cpo&vim
13+
14+
function! SyntaxCheckers_golo_golo_IsAvailable()
15+
return executable('golo')
16+
endfunction
17+
18+
function! SyntaxCheckers_golo_golo_GetLocList() dict
19+
let makeprg = self.makeprgBuild({
20+
\ 'args': 'check --exit' })
21+
22+
let errorformat =
23+
\ '%-P[error] In Golo module: %f,' .
24+
\ '[%t%*[^]]] %m at%*[ {]line%.%l\, column%.%c%.%#,' .
25+
\ '%-Q'
26+
27+
" \ '[%t%*[^]]] %m at%*[ {]line%.%l\, column%.%c%.,' .
28+
return SyntasticMake({
29+
\ 'makeprg': makeprg,
30+
\ 'errorformat': errorformat,
31+
\ 'returns': [0, 1]})
32+
endfunction
33+
34+
call g:SyntasticRegistry.CreateAndRegisterChecker({
35+
\ 'filetype': 'golo',
36+
\ 'name': 'golo'})
37+
38+
let &cpo = s:save_cpo
39+
unlet s:save_cpo
40+
41+

0 commit comments

Comments
 (0)