Config moved in a directory and was renamed, as per specification, with
an added bonus of making room for other engines. Also adds new standard
functions.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
" g:syntastic_nit_args specifies extra arguments to call nitc
" g:syntastic_nit_include_dirs lists directories to include, must be a list
"============================================================================
" g:syntastic_nit_args specifies extra arguments to call nitc
" g:syntastic_nit_include_dirs lists directories to include, must be a list
"============================================================================
-if exists("loaded_nit_syntax_checker")
+if exists("loaded_syntastic_nit_nitc_checker")
-let loaded_nit_syntax_checker = 1
+let loaded_syntastic_nit_nitc_checker = 1
" check if nitc is accessible
if exists('g:syntastic_nitc')
" check if nitc is accessible
if exists('g:syntastic_nitc')
-function! SyntaxCheckers_nit_GetLocList()
+function! SyntaxCheckers_nit_nitc_IsAvailable()
+ return executable(expand(s:nitc))
+endfunction
+
+function! SyntaxCheckers_nit_nitc_GetLocList()
let makeprg = s:nitc . " --no-color --only-metamodel 2>&1 " . shellescape(expand("%"))
" custom NIT_DIR
let makeprg = s:nitc . " --no-color --only-metamodel 2>&1 " . shellescape(expand("%"))
" custom NIT_DIR
return SyntasticMake({ 'makeprg': makeprg, 'errorformat':errorformat })
endfunction
return SyntasticMake({ 'makeprg': makeprg, 'errorformat':errorformat })
endfunction
+
+call g:SyntasticRegistry.CreateAndRegisterChecker({
+ \ 'filetype': 'nit',
+ \ 'name': 'nitc'})