Files
dotfiles/common/.config/nvim/lua/plugins/code-lint.lua
Pratik Tripathy 12178dd96c NVIM
- VIM options updated for: autowrite, formatoptions, conceallevel,
  sidescrolloff, updatetime, wildmode
- LSP_config: options to display diagnostic icons, inlay hints
- Lint: codespell on "*" removed it wasn't working
- Formatting: ignore errors
- LuaSnip: Tab fix reversed, interfered with regular operations
- NVIM: Options for splitkeep & markdown_recommended_style
2024-03-11 17:29:52 +05:30

36 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" },
}
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,
},
}