From 8b7a664ecf9ac3c8c80be8ab661affbe9f670db7 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Fri, 6 Jan 2023 15:17:59 +0100 Subject: Update which key --- fnl/config/which-key.fnl | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) (limited to 'fnl') diff --git a/fnl/config/which-key.fnl b/fnl/config/which-key.fnl index eab6583..3944959 100644 --- a/fnl/config/which-key.fnl +++ b/fnl/config/which-key.fnl @@ -1,4 +1,4 @@ -;; Which-key provides a pop-up meny for some key mappings. +;; Which-key provides a pop-up menu for some key mappings. (module config.which-key {autoload {util config.util}}) (def- setup {:plugins {:marks true @@ -13,9 +13,7 @@ :g true}} :icons {:breadcrumb "»" :separator "" :group "+"} :popup_mappings {:scroll_down : :scroll_up :} - :window {:border :rounded - :position :bottom - :winblend 0} + :window {:border :rounded :position :bottom :winblend 0} :layout {:height {:min 4 :max 25} :width {:min 20 :max 50} :spacing 3 @@ -34,23 +32,23 @@ :noremap true :nowait true}) -(def- mmappings - {:a [:HarpoonAdd :Harpoon] - :c [:DiffviewClose :DiffviewClose] - :d [:DiffviewFileHistory :DiffviewFileHistory] - :f [(fn [] - (util.telescope-builtin :find_files - {:theme :get_dropdown :previewer false})) - "Find files"] - :g ["Telescope live_grep theme=dropdown" "Find text"] - :n [:Neogit :Neogit] - :p [:SaveSession "Save Session"] - :q ["Gitsigns diffthis HEAD" "Gitsigns diff"] - :r [:HarpoonUI "Harpoon UI"] - :s [:HarpoonPrev "Harpoon Prev"] - :t [:HarpoonNext "Harpoon Next"] - :v ["lua vim.lsp.buf.rename()" :Rename] - :x ["DiffviewOpen -uno" :DiffviewOpen]}) +(def- mmappings {:a [:HarpoonAdd :Harpoon] + :d [:DiffviewFileHistory :DiffviewFileHistory] + :f [(fn [] + (util.telescope-builtin :find_files + {:theme :get_dropdown + :previewer false})) + "Find files"] + :g ["Telescope live_grep theme=dropdown" "Find text"] + :n [:Neogit :Neogit] + :p [:SaveSession "Save Session"] + :q ["Gitsigns diffthis HEAD" "Gitsigns diff"] + :r [:HarpoonUI "Harpoon UI"] + :s [:HarpoonPrev "Harpoon Prev"] + :t [:HarpoonNext "Harpoon Next"] + :v ["lua vim.lsp.buf.rename()" :Rename] + :x ["DiffviewOpen -uno" :DiffviewOpen] + :z [:DiffviewClose :DiffviewClose]}) (def- nopts {:mode :n :prefix : @@ -130,7 +128,6 @@ :g git :h [:ColorizerToggle :Colorizer] :l lsp - :n [:CommentNormal :Comment] :m [:Mason :Mason] :r replace :t [:ToggleTerm :Terminal] @@ -157,7 +154,7 @@ (def- gmappings {:a [:OrgAgendaPrompt "Open agenda prompt"] :c [:OrgCapturePrompt "Open capture prompt"] :m ["Telescope orgmode search_headings theme=dropdown" - "Search Headings"]}) + "Search headings"]}) (let [which-key (util.prequire :which-key)] (which-key.setup setup) -- cgit v1.2.3-70-g09d2