docs: added more docs to nvim-lint extensions

This commit is contained in:
Folke Lemaitre
2023-09-29 15:07:29 +02:00
parent 05f45bb720
commit 0f7a009d1c

View File

@ -3,12 +3,25 @@ return {
"mfussenegger/nvim-lint",
event = "BufReadPost",
opts = {
-- Event to trigger linters
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
linters_by_ft = {
fish = { "fish" },
},
-- Custom linters, or fully replace a builtin
linters = {},
linter_opts = {},
-- LazyVim extension to easily override linter options
---@type table<string,table>
linter_opts = {
-- -- 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,
},
},
},
config = function(_, opts)
local M = {}