23 lines
447 B
Lua
23 lines
447 B
Lua
local lint = require("lint")
|
|
|
|
lint.linters_by_ft = {
|
|
lua = { "luacheck" },
|
|
python = { "flake8" },
|
|
bash = { "shellcheck" },
|
|
html = { "htmlhint" },
|
|
docker = { "hadolint" },
|
|
}
|
|
|
|
lint.linters.luacheck.args = {
|
|
unpack(lint.linters.luacheck.args),
|
|
"--globals",
|
|
"love",
|
|
"vim",
|
|
}
|
|
|
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
|
callback = function()
|
|
lint.try_lint()
|
|
end,
|
|
})
|