dotfiles/.config/nvim/lua/plugins/lint.lua
Sergio Laín 2cce8ffdc8
🐛 fix(nvim): rewrite of a lot of the config style, options and plugins
new terminal, telescope plugins moved into telescope.lua for eassier management and a lot more
2023-10-16 12:46:37 +02:00

32 lines
1 KiB
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" },
dockerfile = { "hadolint" },
css = { "stylelint" },
sass = { "stylelint" },
scss = { "stylelint" },
},
-- 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,
-- },
},
},
},
}