From f6682a8a8d53a0c302446596d5f085446fc1c468 Mon Sep 17 00:00:00 2001 From: Vincent Capelle Date: Fri, 15 Nov 2024 11:49:55 -0500 Subject: [PATCH] feat: Add which-key.nvim plugin for mapping help --- vim/lazy-lock.json | 3 ++- vim/lua/plugins/which-key.lua | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 vim/lua/plugins/which-key.lua diff --git a/vim/lazy-lock.json b/vim/lazy-lock.json index 2bf11f7..c99ff93 100644 --- a/vim/lazy-lock.json +++ b/vim/lazy-lock.json @@ -31,5 +31,6 @@ "vim-textobj-line": { "branch": "master", "commit": "0a78169a33c7ea7718b9fa0fad63c11c04727291" }, "vim-textobj-quotes": { "branch": "master", "commit": "cca9686acf7b21d930ced1801120ecf23fb2f995" }, "vim-textobj-user": { "branch": "master", "commit": "074ce2575543f790290b189860597a3dcac1f79d" }, - "vim-wordmotion": { "branch": "master", "commit": "81d9bd298376ab0dc465c85d55afa4cb8d5f47a1" } + "vim-wordmotion": { "branch": "master", "commit": "81d9bd298376ab0dc465c85d55afa4cb8d5f47a1" }, + "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" } } diff --git a/vim/lua/plugins/which-key.lua b/vim/lua/plugins/which-key.lua new file mode 100644 index 0000000..a89bf2c --- /dev/null +++ b/vim/lua/plugins/which-key.lua @@ -0,0 +1,15 @@ +return { + 'folke/which-key.nvim', + event = 'VeryLazy', + opts = { + spec = { + { 'c', group = '[C]ode', mode = { 'n', 'x' } }, + { 'd', group = '[D]ocument' }, + { 'r', group = '[R]ename' }, + { 'f', group = '[F]ind' }, + { 'w', group = '[W]orkspace' }, + { 't', group = '[T]oggle' }, + { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, + }, + }, +}