If you’ve installed luacheck as a .exe and you need vscode-luacheck to work you’re currently going to need to implement a workaround. This appears to be a common issue I’ve seen with people using vscode and luacheck.
If the error you’re seeing is “Please install luacheck or check luacheck.path” you’re seeing, this tutorial is here to help!
Basically, the extension is looking for a luacheck.bat file! You can fix this by just creating a luacheck.bat file that forwards arguments to the folder
The file I’m using is simply this:
I put it right next to the path with the luacheck.exe. This results in linting on my files!
Hopefully the extension creators will fix this soon!
Didn’t work? Or don’t have things installed? Here’s the assumptions made:
If you haven’t installed luacheck yet, we’re assuming the following is true:
- You’re on Windows, using VSCode
- You’ve installed the VSCode extension vscode-luacheck by dwengear
- You’ve downloaded the luacheck.exe from the latest release and put in a folder on your path
- You can execute
luacheckon PowerShell and it finds the .exe (You may have to add luacheck to your path. Checkout the section in this tutorial about adding rojo to your path)
Getting this working in Linux or Mac
If you need this extension to work on Linux or Mac, you’re going to need to install luacheck the more traditional way, and not by copying the luacheck.exe.
Thanks for reading! I hope this article helps you out! Let me know if you have any questions!