From 1389bf45ce74560c5b148e62b8ecddd8c0960150 Mon Sep 17 00:00:00 2001 From: locojay Date: Fri, 14 Feb 2014 14:24:44 -0500 Subject: [PATCH] adding syntaxerl for erlang files --- syntax_checkers/erlang/syntaxerl.vim | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 syntax_checkers/erlang/syntaxerl.vim diff --git a/syntax_checkers/erlang/syntaxerl.vim b/syntax_checkers/erlang/syntaxerl.vim new file mode 100644 index 00000000..c041d685 --- /dev/null +++ b/syntax_checkers/erlang/syntaxerl.vim @@ -0,0 +1,29 @@ +if exists("g:loaded_syntastic_erlang_syntaxerl_checker") + finish +endif + +let g:loaded_syntastic_erlang_syntaxerl_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + + +function! SyntaxCheckers_erlang_syntaxerl_GetLocList() dict + + let makeprg = self.makeprgBuild({}) + + let errorformat = + \ '%W%f:%l: warning: %m,'. + \ '%E%f:%l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'erlang', + \ 'name': 'syntaxerl'}) + +let &cpo = s:save_cpo +unlet s:save_cpo