mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2025-10-21 20:10:41 +00:00
29 lines
691 B
Lua
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,
|
|
}
|