From ae7aae5daa4de171bd4ef8843e9093e9cd722abd Mon Sep 17 00:00:00 2001 From: taynpg Date: Thu, 20 Nov 2025 13:21:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8tab=E4=B8=8D=E5=85=A8?= =?UTF-8?q?=EF=BC=8C=E5=8F=96=E6=B6=88=E9=95=BF=E5=BA=A6=E7=BA=BF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/config/options.lua | 2 +- lua/plugins/blink.lua | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/blink.lua diff --git a/lua/config/options.lua b/lua/config/options.lua index 87b9351..cfc3c08 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -18,7 +18,7 @@ vim.wo.relativenumber = true -- 高亮所在行 vim.wo.cursorline = true -- 右侧参考线,超过表示代码太长了,考虑换行 -vim.wo.colorcolumn = "110" +-- vim.wo.colorcolumn = "110" -- 缩进2个空格等于一个Tab vim.o.tabstop = 4 vim.bo.tabstop = 4 diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua new file mode 100644 index 0000000..2aed698 --- /dev/null +++ b/lua/plugins/blink.lua @@ -0,0 +1,23 @@ +return { + { + "saghen/blink.cmp", + opts = { + keymap = { + preset = "enter", + [""] = { "fallback" }, + [""] = { + function(cmp) + if cmp.snippet_active() then + return cmp.accept() + else + return cmp.select_and_accept() + end + end, + "snippet_forward", + "fallback", + }, + [""] = { "snippet_backward", "fallback" }, + }, + }, + }, +}