From f5538e135f1afe14794613b7a04925826b82bfab Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Sat, 3 May 2025 15:25:47 +0200 Subject: [PATCH] [nvim] add which-key plugin --- dotfiles/nvim/lazy-lock.json | 3 ++- dotfiles/nvim/lua/lazy-plugins.lua | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/dotfiles/nvim/lazy-lock.json b/dotfiles/nvim/lazy-lock.json index 488ff10..7e5e309 100644 --- a/dotfiles/nvim/lazy-lock.json +++ b/dotfiles/nvim/lazy-lock.json @@ -2,5 +2,6 @@ "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, "vim-tmux-navigator": { "branch": "master", "commit": "33afa80db65113561dc53fa732b7f5e53d5ecfd0" }, - "vim-tmux-runner": { "branch": "master", "commit": "eead441119d9863227f4c39dac7890aa09d6b4cd" } + "vim-tmux-runner": { "branch": "master", "commit": "eead441119d9863227f4c39dac7890aa09d6b4cd" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } } diff --git a/dotfiles/nvim/lua/lazy-plugins.lua b/dotfiles/nvim/lua/lazy-plugins.lua index 66fbd5c..26475e6 100644 --- a/dotfiles/nvim/lua/lazy-plugins.lua +++ b/dotfiles/nvim/lua/lazy-plugins.lua @@ -14,6 +14,26 @@ require('lazy').setup({ 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically 'christoomey/vim-tmux-navigator', 'christoomey/vim-tmux-runner', + + { + "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)", + }, + }, + } + }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the