From 2e028581f0a11a2087988c065636332c8407c2a1 Mon Sep 17 00:00:00 2001 From: kongo2002 Date: Fri, 24 Sep 2010 22:19:24 +0800 Subject: [PATCH] add bufnr and error type to lua syntax checker --- syntax_checkers/lua.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/syntax_checkers/lua.vim b/syntax_checkers/lua.vim index 357ac5a5..63c724ac 100644 --- a/syntax_checkers/lua.vim +++ b/syntax_checkers/lua.vim @@ -24,6 +24,14 @@ function! SyntaxCheckers_lua_GetLocList() let makeprg = 'luac -p ' . shellescape(expand('%')) let errorformat = 'luac: %#%f:%l: %m' - return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + let loclist = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) + + let bn = bufnr('') + for loc in loclist + let loc['bufnr'] = bn + let loc['type'] = 'E' + endfor + + return loclist endfunction