From 1cc51f27742197984f463928d842e4fc901792ef Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Fri, 25 Jul 2025 13:39:03 +0545 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(cmp):=20add=20cmp-spell=20for?= =?UTF-8?q?=20spell=20checking=20suggestions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/plugins/lang/blink.lua | 16 +++++++++++++++- lua/plugins/list.lua | 1 + lua/plugins/tools/files.lua | 4 ++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lua/plugins/lang/blink.lua b/lua/plugins/lang/blink.lua index b89e134..efd5d67 100644 --- a/lua/plugins/lang/blink.lua +++ b/lua/plugins/lang/blink.lua @@ -30,7 +30,7 @@ blink.setup({ kind_icons = icons.kind, }, sources = { - default = { 'avante', 'lazydev', 'lsp', 'path', 'snippets', 'buffer', 'copilot' }, + default = { 'avante', 'lazydev', 'lsp', 'path', 'snippets', 'buffer', 'copilot', 'spell' }, providers = { avante = { module = 'blink-cmp-avante', @@ -58,6 +58,20 @@ blink.setup({ -- make lazydev completions top priority (see `:h blink.cmp`) score_offset = 100, }, + spell = { + name = 'spell', + module = 'blink.compat.source', + max_items = 10, + score_offset = -20, + opts = { + keep_all_entries = true, -- don't filter it + -- enable_in_context = function() + -- return require("cmp.config.context").in_treesitter_capture "spell" + -- end, + preselect_correct_word = false, + }, + kind = 'Spell', + }, }, }, }) diff --git a/lua/plugins/list.lua b/lua/plugins/list.lua index 32f6c17..b8121c2 100644 --- a/lua/plugins/list.lua +++ b/lua/plugins/list.lua @@ -137,6 +137,7 @@ local plugins = { 'rafamadriz/friendly-snippets', 'Kaiser-Yang/blink-cmp-avante', 'windwp/nvim-ts-autotag', + 'f3fora/cmp-spell', { 'L3MON4D3/LuaSnip', config = function() diff --git a/lua/plugins/tools/files.lua b/lua/plugins/tools/files.lua index dae1c95..bb281c7 100644 --- a/lua/plugins/tools/files.lua +++ b/lua/plugins/tools/files.lua @@ -9,9 +9,9 @@ files.setup({ mappings = { close = 'q', go_in = '', - go_in_plus = 'L', + go_in_plus = 'l', go_out = '-', - go_out_plus = 'H', + go_out_plus = 'h', reveal_cwd = '@', trim_left = '<', trim_right = '>',