I'm trying to write a synastic_checker for a language called ALF, the checker tool is named sweet. I cannot get my checker to load. I did the following:
- Made the file sweet.vim in syntastic/syntax_checkers/alf/
- Added the following line to the default checkers syntastic/plugin/syntastic/registry.vim: \ 'alf': ['sweet'],
- made sure my checker program is in /usr/local/bin (binary, not a simlink)
I followed the example on the wiki (https://github.com/vim-syntastic/syntastic/wiki/Syntax-Checker-Guide)
:SyntasticInfo output:
Syntastic version: 3.8.0-38 (Vim 704, Linux, GUI)
Info for filetype: alf
Global mode: active
Filetype alf is active
The current file will be checked automatically
Available checkers: -
Currently enabled checkers: -
Press ENTER or type command to continue
Could anyone maybe give me some hints on how to get more debug information? I have the feeling my script is not even being run at all...
P.S: The contents of my checker file are as follows:
if exists('g:loaded_syntastic_alf_sweet_checker')
finish
endif
let g:loaded_syntastic_alf_sweet_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_alf_sweet_IsAvailable() dict
if !exists('g:syntastic_alf_compiler')
let g:syntastic_alf_compiler = executable(self.getExec())
endif
call self.log('g:syntastic_alf_compiler =', g:syntastic_alf_compiler)
return executable(expand(g:syntastic_alf_compiler, 1))
endfunction
" function! SyntaxCheckers_ruby_mri_GetHighlightRegex(item)
" if match(a:item['text'], 'assigned but unused variable') > -1
" let term = split(a:item['text'], ' - ')[1]
" return '\V\\<'.term.'\\>'
" endif
" return ''
" endfunction
function! SyntaxCheckers_alf_sweet_GetLocList() dict
" let makeprg = self.makeprgBuild({
" \ 'args_after': '-i=' })
" let errorformat = '%EAt %l.%c-%l.%c:'
return syntastic#c#GetLocList('alf', 'sweet', {
\ 'errorformat':
\ 'At %l.%c-%l.%c:',
\ 'main_flags': '-i=' . syntastic#util#DevNull() })
" return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat})
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'alf',
\ 'name': 'sweet' })
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker: