From ffb2f5d3e2749fb8537d55b5424d3ba562da9e84 Mon Sep 17 00:00:00 2001 From: AlejandroSuero Date: Tue, 10 Sep 2024 11:43:55 +0200 Subject: [PATCH] fix(nvim): `cspell` with correct filetypes --- roles/neovim/files/lua/custom/plugins/lsp/none-ls.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/neovim/files/lua/custom/plugins/lsp/none-ls.lua b/roles/neovim/files/lua/custom/plugins/lsp/none-ls.lua index 70922fb..39d7be1 100644 --- a/roles/neovim/files/lua/custom/plugins/lsp/none-ls.lua +++ b/roles/neovim/files/lua/custom/plugins/lsp/none-ls.lua @@ -62,8 +62,6 @@ return { return utils.root_has_file { ".markdownlint.json" } end, }, - diagnostics.editorconfig_checker, - cspell.diagnostics, -- code_actions code_actions.refactoring, -- require "none-ls.diagnostics.stylua", @@ -74,6 +72,12 @@ return { end, }, -- diagnostics + diagnostics.editorconfig_checker, + cspell.diagnostics.with { + condition = function(utils) + return utils.root_has_file { "cspell.json", ".cspell.json" } + end, + }, diagnostics.codespell.with { filetypes = { "markdown", "text" }, },