From b7891b27020f38b5f854e3db6624e3178a499b70 Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 14 May 2025 18:23:35 +0200 Subject: Add a shortcut to show all shortkeys --- lua/ache/plugins/which-key.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lua/ache/plugins/which-key.lua b/lua/ache/plugins/which-key.lua index 33b1f3e..e57edcc 100644 --- a/lua/ache/plugins/which-key.lua +++ b/lua/ache/plugins/which-key.lua @@ -1,14 +1,24 @@ --[ --- Show a helpful remainder when you start typing a shortkey. +-- Show a helpful remainder when you start typing a short key. -- --- After some time of hesitation, "which-key" will show all the available mapping and describe them. +-- After some time of hesitation, « which-key » will show all the available mapping and describe them. --] return { "folke/which-key.nvim", + enabled = true, event = "VeryLazy", init = function() vim.opt.timeout = true vim.opt.timeoutlen = 500 end, opts = {}, -- Use default configuration. + keys = { + { + "?", + function() + require("which-key").show({ global = true, loop = true }) + end, + desc = "Buffer Local Keymaps (which-key)", + }, + }, } -- cgit v1.3-2-g11bf