Files
dotfiles/common/.config/nvim/lua/plugins/coding-lint.lua
Pratik Tripathy b24886c297 NVIM
- Added codespell as lint and removed codespell as formatter
- Remove codespell lint info from trouble diagnostic
2024-03-09 22:32:49 +05:30

37 lines
1.2 KiB
Lua

return {
{
"mfussenegger/nvim-lint",
lazy = true,
event = { "BufReadPre", "BufNewFile" },
config = function()
local lint = require("lint")
-- Linters are only required for dynamically typed languages
lint.linters_by_ft = {
python = { "pylint", "codespell" },
markdown = { "markdownlint", "codespell" },
yaml = { "yamllint" },
lua = { "codespell" },
bash = { "codespell" },
sh = { "codespell" },
zsh = { "codespell" },
typescript = { "codespell" },
javascript = { "codespell" },
typescriptreact = { "codespell" },
javascriptreact = { "codespell" },
html = { "codespell" },
["*"] = { "codespell" },
}
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,
},
}