summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-10-17 00:44:14 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-10-17 00:44:14 +0200
commitc526971bfd29d80556b5b352b310573250e08f55 (patch)
tree4e2566b4f71b030c30ea979e1433af239a47df7d
parentbe481f2c2a4b8a39a3ccd89775a3771338d39232 (diff)
Update which-key
-rw-r--r--fnl/config/which-key.fnl28
1 files changed, 17 insertions, 11 deletions
diff --git a/fnl/config/which-key.fnl b/fnl/config/which-key.fnl
index 2ad2459..1412c1a 100644
--- a/fnl/config/which-key.fnl
+++ b/fnl/config/which-key.fnl
@@ -51,7 +51,7 @@
:h ["<cmd>lua require('harpoon.ui').nav_prev()<cr>"
"Harpoon Prev"]
:t ["<cmd>Telescope harpoon marks theme=dropdown<cr>"
- "Search Files"]
+ "Search Harpoon"]
:v ["<cmd>lua vim.lsp.buf.rename()<cr>" :Rename]
:p [:<cmd>SaveSession<cr> "Save Session"]
:r ["<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>"
@@ -72,7 +72,7 @@
:f ["<cmd>lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})<cr>"
"Find files"]
:t ["<cmd>Telescope live_grep theme=ivy<cr>" "Find text"]
- :s ["<cmd>SearchSession<cr>" "Find Session"]
+ :s [:<cmd>SearchSession<cr> "Find Session"]
:S ["<cmd>Telescope grep_string theme=dropdown<cr>" "Find String"]
:h ["<cmd>Telescope help_tags<cr>" :Help]
:H ["<cmd>Telescope highlights<cr>" :Highlights]
@@ -116,12 +116,6 @@
:S ["<cmd>Telescope lsp_dynamic_workspace_symbols<cr>"
"Workspace Symbols"]})
-(def- org {:name :Orgmode
- :a ["<cmd>lua require('orgmode').action('agenda.prompt')<cr>"
- "Open agenda prompt"]
- :c ["<cmd>lua require('orgmode').action('capture.prompt')<cr>"
- "Open capture prompt"]})
-
(def- packer {:name :Packer
:c [:<cmd>PackerCompile<cr> :Compile]
:i [:<cmd>PackerInstall<cr> :Install]
@@ -155,10 +149,9 @@
:l lsp
:n ["<cmd>lua require('Comment.api').toggle.linewise.current()<CR>"
:Comment]
- :o org
:p packer
:r replace
- :u [:<cmd>UndotreeToggle<cr> "Undotree"]
+ :u [:<cmd>UndotreeToggle<cr> :Undotree]
:s [switch-window "Switch window"]
:t [:<cmd>ToggleTerm<cr> :Terminal]
:T treesitter
@@ -174,8 +167,21 @@
(def- vmappings {:n ["<ESC><CMD>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<CR>"
:Comment]})
+(def- gopts {:mode :n
+ :prefix :g
+ :buffer nil
+ :silent true
+ :noremap true
+ :nowait true})
+
+(def- gmappings {:a ["<cmd>lua require('orgmode').action('agenda.prompt')<cr>"
+ "Open agenda prompt"]
+ :c ["<cmd>lua require('orgmode').action('capture.prompt')<cr>"
+ "Open capture prompt"]})
+
(let [which-key (util.prequire :which-key)]
(which-key.setup setup)
(which-key.register mmappings mopts)
(which-key.register nmappings nopts)
- (which-key.register vmappings vopts))
+ (which-key.register vmappings vopts)
+ (which-key.register gmappings gopts))