This module integrates static analyzers with Textadept. Currently, the module integrates luacheck
with annotations and indicators (squiggle markers) for errors and warnings within the code editor.
The module calls the static analyzer each time when a file is saved. You can integrate additional static analyzers with this module by following the luacheck
example.
The module takes the responsibility of displaying the errors and warnings within the editor itself; however, your submodule is expected to:
- provide the shell command with all the options and arguments;
- parse the output of the static analyzer; and
- sort the results into errors and warnings (see how all of this is done with the
luacheck
example).
To load textadept-analyzer
, add the following line in your init.lua
:
local analyzer = require("textadept-analyzer")
Once you open a Lua file, the analyzer will begin to call luacheck
as you edit and save the file.
The module was updated and tested with Textadept 12.6. Thanks to Ian Nomar.