The description of the lua.luacheckPath setting is misleading. It says it “[s]pecifies the path to the luacheck binary (if not found on PATH).” Actually, it can never be found because the PATH variable is not passed to the language server. That means that the default value (which is "luacheck" – https://github.com/trixnz/vscode-lua/blob/v0.12.4/package.json#L52) won't work and the only way to make luacheck work is to specify the full path (e.g., /home/user/.local/bin/luacheck if it installed locally to the user's home).
The description of the
lua.luacheckPathsetting is misleading. It says it “[s]pecifies the path to the luacheck binary (if not found on PATH).” Actually, it can never be found because thePATHvariable is not passed to the language server. That means that the default value (which is"luacheck"– https://github.com/trixnz/vscode-lua/blob/v0.12.4/package.json#L52) won't work and the only way to makeluacheckwork is to specify the full path (e.g.,/home/user/.local/bin/luacheckif it installed locally to the user's home).