Files
dotfiles/common/.config/nvim/lua/plugins/linting.lua
Pratik Tripathy ae6d1cebb8 refactor(neovim): Rename files, move plugin declarations around, remove
plugins completely

- Removed: dotnet with all related configs & plugins
- Removed: `vim-highlightedyank` replaced with autocommand
- Moved: `indent-blankline` from `code-generic` -> `ui`
- Moved: All javascript plugins to `code-lsp`: WIP
- Moved: `vim-easymotion` from `code-navigation` -> `navigation`
- Renamed: `code-completion` -> `completion`
- Renamed: `code-formatting` -> `formatting`
- Renamed: `code-git` -> `git`
- Renamed: `code-lint` -> `lint`
- Renamed: `navigate-files` -> `navigation`
2025-07-28 12:54:04 +05:30

44 lines
1.4 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" },
dockerfile = { "hadolint" },
html = { "codespell" },
}
local markdownlint = lint.linters.markdownlint
markdownlint.args = {
"--config",
"~/.config/templates/markdownlint.json",
"--",
}
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,
},
}