✨ feat(nvim): added cspell as global linter for all files if cspell.json is found
This commit is contained in:
parent
b3efc28e99
commit
0139f36326
1 changed files with 15 additions and 0 deletions
15
.config/nvim/lua/plugins/nvim-lint.lua
Normal file
15
.config/nvim/lua/plugins/nvim-lint.lua
Normal 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,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue