diff options
| author | Vito G. Graffagnino <vito@graffagnino.xyz> | 2022-05-28 12:40:17 +0100 |
|---|---|---|
| committer | Vito G. Graffagnino <vito@graffagnino.xyz> | 2022-05-28 12:40:17 +0100 |
| commit | 993408daee54ae2a245b97602aaf73e6cdf3d8e1 (patch) | |
| tree | 24da27cdf2999477ebb349ad2fc9e621e1e4985e /lua/user/whichkey.lua | |
| parent | 24e1856862e859b60cd5b38fa6befa00f75de89a (diff) | |
| parent | 418fed300187f0cd2dbd8d8fc791dd4aa08b70fe (diff) | |
Merge branch 'vgg' into 22-autocommands22-autocommands
Diffstat (limited to 'lua/user/whichkey.lua')
| -rw-r--r-- | lua/user/whichkey.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lua/user/whichkey.lua b/lua/user/whichkey.lua index f5520b1..35da924 100644 --- a/lua/user/whichkey.lua +++ b/lua/user/whichkey.lua @@ -79,6 +79,7 @@ local opts = { } local mappings = { + ["/"] = { "<cmd>lua require(\"Comment.api\").toggle_current_linewise()<CR>", "Comment" }, ["a"] = { "<cmd>Alpha<cr>", "Alpha" }, ["b"] = { "<cmd>lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})<cr>", @@ -185,3 +186,16 @@ local mappings = { which_key.setup(setup) which_key.register(mappings, opts) +local vopts = { + mode = "v", -- VISUAL mode + prefix = "<leader>", + buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings + silent = true, -- use `silent` when creating keymaps + noremap = true, -- use `noremap` when creating keymaps + nowait = true, -- use `nowait` when creating keymaps +} +local vmappings = { + ["/"] = { "<ESC><CMD>lua require(\"Comment.api\").toggle_linewise_op(vim.fn.visualmode())<CR>", "Comment" }, +} + +which_key.register(vmappings, vopts) |
