From 120a37c1659d104b0a8b7fd7e2243daf6831a298 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 27 Aug 2025 11:00:54 +0100 Subject: [PATCH] Disable spell mode highlight groups if harper-ls installed --- lua/plugins/colorscheme.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 2e3e311..c573158 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -33,6 +33,16 @@ local kanagawa = { vim.cmd.highlight('MsgSeparator', 'guifg=' .. dragon.ui.bg_m3, 'guibg=' .. dragon.ui.bg_m3) vim.cmd.highlight('TreesitterContext', 'guibg=' .. dragon.ui.bg_gutter) + -- Detect if harper-ls is installed + local mason_registry = require('mason-registry') + if mason_registry.is_installed('harper-ls') then + -- Disable builtin spell mode highlighting in favor of harper-ls + vim.cmd.highlight('SpellBad', 'NONE') + vim.cmd.highlight('SpellCap', 'NONE') + vim.cmd.highlight('SpellLocal', 'NONE') + vim.cmd.highlight('SpellRare', 'NONE') + end + -- Don't lighlight TODO specially in comments for _, todo_group in pairs({ 'confTodo',