You can set the error format string to recognize the output of the lua interpreter. For example, add this to your .vimrc file:
autocmd BufRead *.lua setlocal efm=%s:\ %f:%l:%m
This suggests that the errors in your version of Lua look like this:
lua: blah.lua:2: '=' expected near 'var'
Bonus tip: instead of using the makefile, you can use the parameter makeprg:
autocmd BufRead *.lua setlocal makeprg=lua\ %
This will cause the current file to run through lua as you type :make.
source
share