I have a makefile that looks like:
default:
lua blah.lua
Now, in Vim, I type “:make”.
There’s an error in my Lua code; it gives a file name + line number. I would like Vim to jump to the right file/line. How do I make this happen?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can set the error-format string to recognise the lua interpreter’s output. For example, add this to your .vimrc file:
That assumes the errors in your version of Lua look like this:
Bonus tip: rather than use a makefile, you can use the
makeprgsetting:That will run the current file through lua when you type
:make.