This package adds a flymake backend to check Lua files using
luacheck. If luacheck is not available, then luac will be used to
check for syntax errors.
The function flymake-luacheck-setup should be run in the buffer to
be checked before enabling flymake-mode. For convenience, the
function flymake-luacheck-activate will add the backend, and
turn on flymake-mode.
(require 'flymake-luacheck)
(add-hook 'lua-mode #'flymake-luacheck-activate)or, using use-package:
(use-package flymake-luacheck
:hook (lua-mode . flymake-luacheck-activate))You may wish to customize the flymake-luacheck-standard-globals variable
to set what luacheck considers to be the set of standard globals.
If your project uses a .luacheckrc file, you may wish to set this
to nil in a .dir-locals.el file
((lua-mode . ((flymake-luacheck-standard-globals . nil))))and set the standard globals set in the .luacheckrc using the std variable:
std = "luajit"flymake-luacheck is copyright 2020 by David M. Cooke [email protected],
and is licensed under the MIT license, the text of which is included in
the LICENSE file.