feat(nvim): added cspell as global linter for all files if cspell.json is found

This commit is contained in:
Sergio Laín 2023-12-01 00:47:05 +01:00
parent b3efc28e99
commit 0139f36326
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -0,0 +1,15 @@
return {
"mfussenegger/nvim-lint",
opts = {
linters_by_ft = {
["*"] = { "cspell" },
},
linters = {
cspell = {
condition = function(ctx)
return vim.fs.find({ "cspell.json" }, { path = ctx.filename, upward = true })[1]
end,
},
},
},
}