mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
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`
This commit is contained in:
43
common/.config/nvim/lua/plugins/linting.lua
Normal file
43
common/.config/nvim/lua/plugins/linting.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
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,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user