From b619712b35e9da4c47bc78d4a364740d8485b31b Mon Sep 17 00:00:00 2001 From: xfy Date: Mon, 1 Jun 2026 10:32:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(pack):=20=E6=96=B0=E5=A2=9E=20mini.cursorw?= =?UTF-8?q?ord=20=E6=8F=92=E4=BB=B6=EF=BC=8C=E8=87=AA=E5=8A=A8=E9=AB=98?= =?UTF-8?q?=E4=BA=AE=E5=85=89=E6=A0=87=E4=B8=8B=E5=8D=95=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/pack.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/pack.lua b/lua/pack.lua index 401cdf2..9dd0458 100644 --- a/lua/pack.lua +++ b/lua/pack.lua @@ -176,6 +176,7 @@ local all_modules = { "ex-colors", "pairs", "ai", + "cursorword", } -- 计算 Logo 的最大显示宽度,用于页脚居中计算 @@ -319,6 +320,14 @@ lazy.on_event("ai", "BufReadPost", "*", function() require("mini.ai").setup() end) +-- --------------------------------------------------------------------------- +-- mini.cursorword — 自动高亮光标下单词(BufReadPost 懒加载) +-- --------------------------------------------------------------------------- +-- 光标停留在某个单词上时,自动高亮 buffer 中所有相同的单词。 +lazy.on_event("cursorword", "BufReadPost", "*", function() + require("mini.cursorword").setup() +end) + -- --------------------------------------------------------------------------- -- mini.cmdline — 增强命令行 -- ---------------------------------------------------------------------------