From 0139f36326f816f9bb9c5c5ff474b8e7ac5ca1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Fri, 1 Dec 2023 00:47:05 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(nvim):=20added=20cspell=20as?= =?UTF-8?q?=20global=20linter=20for=20all=20files=20if=20cspell.json=20is?= =?UTF-8?q?=20found?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/plugins/nvim-lint.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .config/nvim/lua/plugins/nvim-lint.lua diff --git a/.config/nvim/lua/plugins/nvim-lint.lua b/.config/nvim/lua/plugins/nvim-lint.lua new file mode 100644 index 00000000..46e1b47a --- /dev/null +++ b/.config/nvim/lua/plugins/nvim-lint.lua @@ -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, + }, + }, + }, +}