docs: added more docs to nvim-lint extensions
This commit is contained in:
@ -3,12 +3,25 @@ return {
|
|||||||
"mfussenegger/nvim-lint",
|
"mfussenegger/nvim-lint",
|
||||||
event = "BufReadPost",
|
event = "BufReadPost",
|
||||||
opts = {
|
opts = {
|
||||||
|
-- Event to trigger linters
|
||||||
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
|
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
|
||||||
linters_by_ft = {
|
linters_by_ft = {
|
||||||
fish = { "fish" },
|
fish = { "fish" },
|
||||||
},
|
},
|
||||||
|
-- Custom linters, or fully replace a builtin
|
||||||
linters = {},
|
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)
|
config = function(_, opts)
|
||||||
local M = {}
|
local M = {}
|
||||||
|
Reference in New Issue
Block a user