From c526971bfd29d80556b5b352b310573250e08f55 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 17 Oct 2022 00:44:14 +0200 Subject: Update which-key --- fnl/config/which-key.fnl | 28 +++++++++++++++++----------- 1 file 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 ["lua require('harpoon.ui').nav_prev()" "Harpoon Prev"] :t ["Telescope harpoon marks theme=dropdown" - "Search Files"] + "Search Harpoon"] :v ["lua vim.lsp.buf.rename()" :Rename] :p [:SaveSession "Save Session"] :r ["lua require('harpoon.ui').toggle_quick_menu()" @@ -72,7 +72,7 @@ :f ["lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})" "Find files"] :t ["Telescope live_grep theme=ivy" "Find text"] - :s ["SearchSession" "Find Session"] + :s [:SearchSession "Find Session"] :S ["Telescope grep_string theme=dropdown" "Find String"] :h ["Telescope help_tags" :Help] :H ["Telescope highlights" :Highlights] @@ -116,12 +116,6 @@ :S ["Telescope lsp_dynamic_workspace_symbols" "Workspace Symbols"]}) -(def- org {:name :Orgmode - :a ["lua require('orgmode').action('agenda.prompt')" - "Open agenda prompt"] - :c ["lua require('orgmode').action('capture.prompt')" - "Open capture prompt"]}) - (def- packer {:name :Packer :c [:PackerCompile :Compile] :i [:PackerInstall :Install] @@ -155,10 +149,9 @@ :l lsp :n ["lua require('Comment.api').toggle.linewise.current()" :Comment] - :o org :p packer :r replace - :u [:UndotreeToggle "Undotree"] + :u [:UndotreeToggle :Undotree] :s [switch-window "Switch window"] :t [:ToggleTerm :Terminal] :T treesitter @@ -174,8 +167,21 @@ (def- vmappings {:n ["lua require('Comment.api').toggle.linewise(vim.fn.visualmode())" :Comment]}) +(def- gopts {:mode :n + :prefix :g + :buffer nil + :silent true + :noremap true + :nowait true}) + +(def- gmappings {:a ["lua require('orgmode').action('agenda.prompt')" + "Open agenda prompt"] + :c ["lua require('orgmode').action('capture.prompt')" + "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)) -- cgit v1.2.3-70-g09d2