From 12ef2ee68caf2151df9d3d22bfa39dacf44e0fb1 Mon Sep 17 00:00:00 2001 From: Yuchen Ying Date: Sun, 29 Nov 2015 14:37:49 -0800 Subject: Add: syntax checker to be used by Syntastic Integration doc: https://github.com/scrooloose/syntastic/wiki/Syntax-Checker-Guide#7-external-checkers --- syntax_checkers/beancount/bean_check.vim | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 syntax_checkers/beancount/bean_check.vim diff --git a/syntax_checkers/beancount/bean_check.vim b/syntax_checkers/beancount/bean_check.vim new file mode 100644 index 0000000..c3e5fce --- /dev/null +++ b/syntax_checkers/beancount/bean_check.vim @@ -0,0 +1,26 @@ +if exists('g:loaded_syntastic_beancount_bean_check') + finish +endif + +let g:loaded_syntastic_beancount_bean_check=1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_beancount_bean_check_IsAvailable() dict + return executable(self.getExec()) +endfunction + +function! SyntaxCheckers_beancount_bean_check_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + return SyntasticMake({ 'makeprg': makeprg }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'beancount', + \ 'name': 'bean_check', + \ 'exec': 'bean-check'}) + +let &cpo = s:save_cpo +unlet s:save_cpo -- cgit v1.2.3-2-gb3c3