mirror of
https://github.com/tuxdotrs/tnvim.git
synced 2025-07-06 21:36:34 +05:30
22 lines
477 B
Lua
22 lines
477 B
Lua
-- Doesn't work
|
|
|
|
local lint = require("lint")
|
|
|
|
lint.linters_by_ft = {
|
|
lua = { "luacheck" },
|
|
javascript = { "eslint_d" },
|
|
typescript = { "eslint_d" },
|
|
javascriptreact = { "eslint_d" },
|
|
typescriptreact = { { "eslint_d" } },
|
|
nix = { "statix" },
|
|
}
|
|
|
|
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
|
|
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
|
group = lint_augroup,
|
|
callback = function()
|
|
lint.try_lint()
|
|
end,
|
|
})
|