mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(markdown): enable config file discovery for markdownlint-cli2
This commit is contained in:
parent
31caef21fd
commit
ab5df18af7
1 changed files with 17 additions and 5 deletions
|
|
@ -56,11 +56,23 @@ return {
|
|||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
markdown = { "markdownlint-cli2" },
|
||||
},
|
||||
},
|
||||
opts = function(_, opts)
|
||||
opts.linters_by_ft = opts.linters_by_ft or {}
|
||||
opts.linters_by_ft.markdown = { "markdownlint-cli2" }
|
||||
|
||||
opts.linters = opts.linters or {}
|
||||
opts.linters["markdownlint-cli2"] = {
|
||||
-- Disable stdin to enable config file discovery.
|
||||
-- markdownlint-cli2 traverses directories to find .markdownlint.json,
|
||||
-- .markdownlint-cli2.jsonc, etc., but this only works with file paths.
|
||||
stdin = false,
|
||||
args = {},
|
||||
parser = require("lint.parser").from_errorformat("%f:%l:%c %m,%f:%l %m", {
|
||||
source = "markdownlint",
|
||||
severity = vim.diagnostic.severity.WARN,
|
||||
}),
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue