From bb6936d7465a9e4edca7c979d9763a9e9ad34e6a Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 8 Aug 2022 16:12:22 +0200 Subject: Add harpoon --- fnl/config/which-key.fnl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'fnl/config/which-key.fnl') diff --git a/fnl/config/which-key.fnl b/fnl/config/which-key.fnl index 9f3d31b..13c6ebc 100644 --- a/fnl/config/which-key.fnl +++ b/fnl/config/which-key.fnl @@ -28,14 +28,20 @@ :triggers :auto :triggers_blacklist {:i [:j :k] :v [:j :k]}}) -(def- nopts {:mode :n - :prefix : +(def- mopts {:mode :n + :prefix :m :buffer nil :silent true :noremap true :nowait true}) -(def- vopts {:mode :v +(def- mmappings {:a ["lua require('harpoon.mark').add_file()" "Harpoon"] + :l ["lua require('harpoon.ui').nav_next()" "Harpoon Next"] + :h ["lua require('harpoon.ui').nav_prev()" "Harpoon Prev"] + :t ["Telescope harpoon marks" "Search Files"] + :r ["lua require('harpoon.ui').toggle_quick_menu()" "Harpoon UI"]}) + +(def- nopts {:mode :n :prefix : :buffer nil :silent true @@ -142,10 +148,18 @@ :T treesitter :z [:ZenMode "Zen Mode"]}) +(def- vopts {:mode :v + :prefix : + :buffer nil + :silent true + :noremap true + :nowait true}) + (def- vmappings {:n ["lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())" :Comment]}) (let [which-key (util.load-plugin :which-key)] (which-key.setup setup) + (which-key.register mmappings mopts) (which-key.register nmappings nopts) (which-key.register vmappings vopts)) -- cgit v1.2.3-70-g09d2