From d313a3e6504cbcda9f2998b0a9e5ee9cc737f6f7 Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Wed, 30 Apr 2025 11:54:07 +0800 Subject: [PATCH] feat nvim: add which-key --- .../nvim/exact_lua/exact_plugins/help.lua | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 dot_config/nvim/exact_lua/exact_plugins/help.lua diff --git a/dot_config/nvim/exact_lua/exact_plugins/help.lua b/dot_config/nvim/exact_lua/exact_plugins/help.lua new file mode 100644 index 0000000..271eca4 --- /dev/null +++ b/dot_config/nvim/exact_lua/exact_plugins/help.lua @@ -0,0 +1,28 @@ +return { + { + "folke/which-key.nvim", + event = "VeryLazy", + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, + keys = { + { + "?", + function() + require("which-key").show({ global = false }) + end, + desc = "Buffer Local Keymaps (which-key)", + }, + }, + config = function() + vim.o.timeout = true + vim.o.timeoutlen = 300 + + local wk = require("which-key") + -- 快捷鍵在這裡定義 + wk.setup() + end, + }, +}