SoloVim/lua/plugins/lint.lua
Kristofers Solo e0f12a9ce3 Update 2025-02-28
Update 2025-02-14

Update 2025-02-16

Update 2025-02-21

Update 2025-02-23

Update 2025-02-25

Update 2025-02-27

Update 2025-02-28
2025-04-16 13:42:48 +03:00

29 lines
691 B
Lua

local js = { "biomejs" }
return {
"mfussenegger/nvim-lint",
opts = {
events = { "InsertLeave", "BufWritePost", "BufReadPost", "InsertEnter" },
linters_by_ft = {
javascript = js,
javascriptreact = js,
typescript = js,
typescriptreact = js,
python = { "mypy" },
htmldjango = { "djlint" },
lua = { "selene" },
cmake = { "cmakelint" },
["*"] = { "codespell", "typos" },
},
},
config = function(_, opts)
local lint = require("lint")
lint.linters_by_ft = opts.linters_by_ft
vim.api.nvim_create_autocmd(opts.events, {
group = vim.api.nvim_create_augroup("nvim-lint", { clear = true }),
callback = function()
lint.try_lint()
end,
})
end,
}