-- ============================================================================ -- WHICH-KEY: Keybinding popup helper -- ============================================================================ -- Shows available keybindings in a popup when you start a key sequence. -- Press and wait to see all leader mappings. Helps discover and -- remember keybindings. Also shows marks, registers, and spelling suggestions. -- ============================================================================ return { "folke/which-key.nvim", event = "VeryLazy", init = function() vim.o.timeout = true vim.o.timeoutlen = 200 -- Reduced from 500 for faster response end, config = function() local wk = require("which-key") wk.setup({ plugins = { marks = true, registers = true, spelling = { enabled = true, suggestions = 20 }, }, win = { border = "rounded", padding = { 2, 2, 2, 2 }, }, }) -- Register group names for better organization wk.add({ { "b", group = "Buffer" }, { "c", group = "Code/Copilot" }, { "d", group = "Debug/DAP" }, { "e", group = "Explorer" }, { "f", group = "Find/Files" }, { "g", group = "Git" }, { "l", group = "LSP/LeetCode" }, { "m", group = "Format" }, { "n", group = "Notifications" }, { "p", group = "Project" }, { "q", group = "Quit" }, { "s", group = "Session/Split/Substitute" }, { "t", group = "Tab/Terminal/Text" }, { "w", group = "Save" }, { "x", group = "Trouble/Quickfix" }, { "z", group = "Copilot Chat" }, }) end, }