From d8a7f569047466ee679a4e6be35ba596def18cf2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Tue, 5 Mar 2013 11:23:58 -0500 Subject: [PATCH] misc: update vim syntastic plugin to latest specification MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- misc/vim/syntax_checkers/{nit.vim => nit/nitc.vim} | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) rename misc/vim/syntax_checkers/{nit.vim => nit/nitc.vim} (86%) diff --git a/misc/vim/syntax_checkers/nit.vim b/misc/vim/syntax_checkers/nit/nitc.vim similarity index 86% rename from misc/vim/syntax_checkers/nit.vim rename to misc/vim/syntax_checkers/nit/nitc.vim index 222c080..448c7ae 100644 --- a/misc/vim/syntax_checkers/nit.vim +++ b/misc/vim/syntax_checkers/nit/nitc.vim @@ -13,10 +13,10 @@ " 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") finish endif -let loaded_nit_syntax_checker = 1 +let loaded_syntastic_nit_nitc_checker = 1 " check if nitc is accessible if exists('g:syntastic_nitc') @@ -32,7 +32,11 @@ if !executable(s:nitc) finish endif -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 @@ -66,3 +70,7 @@ function! SyntaxCheckers_nit_GetLocList() return SyntasticMake({ 'makeprg': makeprg, 'errorformat':errorformat }) endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'nit', + \ 'name': 'nitc'}) -- 1.7.9.5