Initial commit
This commit is contained in:
commit
209ba130c0
4852 changed files with 1517959 additions and 0 deletions
37
.config/lite-xl/plugins/lintplus/linters/nelua.lua
Normal file
37
.config/lite-xl/plugins/lintplus/linters/nelua.lua
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
-- Nelua plugin for lint+
|
||||
|
||||
--- CONFIG ---
|
||||
|
||||
-- config.lint.nelua_mode: "analyze" | "lint"
|
||||
-- changes the linting mode, "analyze" (default) does a complete checking,
|
||||
-- while "lint" only checks for syntax errors.
|
||||
|
||||
--- IMPLEMENTATION ---
|
||||
|
||||
local core = require 'core'
|
||||
local lintplus = require 'plugins.lintplus'
|
||||
|
||||
local mode = lintplus.config.nelua_mode or "analyze"
|
||||
|
||||
if mode ~= "analyze" and mode ~= "lint" then
|
||||
core.error("lint+/nelua: invalid nelua_mode '%s'. Available modes: 'analyze', 'lint'", mode)
|
||||
mode = "lint"
|
||||
end
|
||||
|
||||
local command = lintplus.command {
|
||||
'nelua',
|
||||
'--no-color',
|
||||
'--'..mode,
|
||||
lintplus.filename
|
||||
}
|
||||
|
||||
lintplus.add 'nelua' {
|
||||
filename = '%.nelua$',
|
||||
procedure = {
|
||||
command = command,
|
||||
interpreter = lintplus.interpreter {
|
||||
error = "(.-):(%d+):(%d+):.-error: (.+)"
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue