From ae1bfdf6c36ac53bb5a7541a1723046258cf807f Mon Sep 17 00:00:00 2001 From: cap153 <67049883+cap153@users.noreply.github.com> Date: Mon, 20 Jan 2025 16:01:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=94=AE=E4=BD=8D=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/lazy/plugins/blinkcmp.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lua/lazy/plugins/blinkcmp.lua b/lua/lazy/plugins/blinkcmp.lua index fbc0a47..9728aca 100644 --- a/lua/lazy/plugins/blinkcmp.lua +++ b/lua/lazy/plugins/blinkcmp.lua @@ -10,15 +10,15 @@ return { [''] = { 'show', 'show_documentation', 'hide_documentation' }, -- [''] = { 'hide' }, -- fallback命令将运行下一个非闪烁键盘映射(回车键的默认换行等操作需要) - [''] = { 'accept', 'fallback' }, -- 'select_and_accept'会选择第一项插入 + [''] = { 'accept', 'fallback' }, -- 更改成'select_and_accept'会选择第一项插入 [''] = { 'select_prev', 'snippet_backward', 'fallback' }, - [''] = { 'select_next', 'snippet_forward', 'fallback' }, + [''] = { 'select_next', 'snippet_forward', 'fallback' }, -- 同时存在补全列表和snippet时,补全列表选择优先级更高 [''] = { 'scroll_documentation_up', 'fallback' }, [''] = { 'scroll_documentation_down', 'fallback' }, - [''] = { 'snippet_forward', 'fallback' }, - [''] = { 'snippet_backward', 'fallback' }, + [''] = { 'snippet_forward', 'select_next', 'fallback' }, -- 同时存在补全列表和snippet时,snippet跳转优先级更高 + [''] = { 'snippet_backward', 'select_prev', 'fallback' }, }, completion = { @@ -54,10 +54,10 @@ return { default = { 'buffer', 'lsp', 'path', 'snippets', }, providers = { -- score_offset设置优先级数字越大优先级越高 - buffer = { score_offset = 3 }, - lsp = { score_offset = 2 }, - path = { score_offset = 1 }, - snippets = { score_offset = 4 }, + buffer = { score_offset = 2 }, + lsp = { score_offset = 1 }, + path = { score_offset = 4 }, + snippets = { score_offset = 3 }, } }, },