dotfiles/.config/nvim/lua/plugins/lint.lua
Sergio Laín 438af606a1
🐛 fix(nvim): changed a lot of stuff to adapt to the new 10.0 lazyvim update
the new lazyvim update was huge, especially because none-ls was moved to extras, so conform and lint
would be the default formatter-linting
2023-10-13 14:06:10 +02:00

30 lines
962 B
Lua

return {
{
"mfussenegger/nvim-lint",
event = "LazyFile",
opts = {
-- Event to trigger linters
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
linters_by_ft = {
fish = { "fish" },
markdown = { "markdownlint" },
python = { "pylint" },
yaml = { "yamllint" },
dockerfile = { "hadolint" },
},
-- LazyVim extension to easily override linter options
-- or add custom linters.
---@type table<string,table>
linters = {
-- -- Example of using selene only when a selene.toml file is present
-- selene = {
-- -- `condition` is another LazyVim extension that allows you to
-- -- dynamically enable/disable linters based on the context.
-- condition = function(ctx)
-- return vim.fs.find({ "selene.toml" }, { path = ctx.filename, upward = true })[1]
-- end,
-- },
},
},
},
}