aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/which-key.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--nvim/lua/plugins/which-key.lua25
1 files changed, 20 insertions, 5 deletions
diff --git a/nvim/lua/plugins/which-key.lua b/nvim/lua/plugins/which-key.lua
index 5b1383e..4e391f9 100644
--- a/nvim/lua/plugins/which-key.lua
+++ b/nvim/lua/plugins/which-key.lua
@@ -1,10 +1,25 @@
+local config = function()
+ require("which-key").setup()
+ vim.o.timeout = true
+ vim.o.timeoutlen = 500
+end
+
return {
"folke/which-key.nvim",
lazy = true,
event = "VeryLazy",
- init = function()
- vim.o.timeout = true
- vim.o.timeoutlen = 500
- end,
- opts = {}
+ config = config,
+ keys = {
+ {
+ "<leader>?",
+ function()
+ require("which-key").show({ global = false })
+ end,
+ desc = "Buffer Local Keymaps (which-key)",
+ },
+ },
+ dependencies = {
+ "echasnovski/mini.icons",
+ "nvim-tree/nvim-web-devicons", -- optional
+ },
}