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:
- Added the following line to the default checkers syntastic/plugin/syntastic/registry.vim:
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 please give me a hand? I am new to this.
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: