feat: move all linting to linting.lua

This commit is contained in:
Devin Haska 2024-04-26 23:15:31 -06:00
parent bca2c8ec94
commit d6cf3129ff

View file

@ -1,32 +0,0 @@
return {
"mfussenegger/nvim-lint",
event = {
"BufReadPre",
"BufNewFile",
},
config = function()
local lint = require("lint")
local djlint = lint.linters.djlint
djlint.args = {
"--reformat",
}
lint.linters_by_ft = {
html = { "djlint" },
javascript = { "eslint_d" },
typescript = { "eslint_d" },
javascriptreact = { "eslint_d" },
typescriptreact = { "eslint_d" },
}
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,
})
end,
}