From 7f90f7c25da27ae42c72359395a2fa0008b24b8a Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Fri, 19 Jul 2024 01:49:09 +0200 Subject: Fix which-key and icons --- fnl/plugins/which-key.fnl | 59 +++++++++++++++++++++++++++++------------------ fnl/settings/icons.fnl | 19 ++++++++++++--- 2 files changed, 52 insertions(+), 26 deletions(-) (limited to 'fnl') diff --git a/fnl/plugins/which-key.fnl b/fnl/plugins/which-key.fnl index cc40d17..269978e 100644 --- a/fnl/plugins/which-key.fnl +++ b/fnl/plugins/which-key.fnl @@ -5,43 +5,56 @@ (local opts {:plugins {:marks true :registers true :spelling {:enabled true :suggestions 20} - :presets {:operators false - :motions false - :text_objects false + :presets {:operators true + :motions true + :text_objects true :windows true :nav true :z true :g true}} :icons {:breadcrumb (. icons :guillemet) :separator (.. (. icons :small-right-arrow) " ") - :group "+"} - :popup_mappings {:scroll_down : :scroll_up :} - :window {:border :rounded :position :bottom :winblend 0} + :group "+" + :colors false + :keys {:Up (.. (. icons :up-arrow) " ") + :Down (.. (. icons :down-arrow) " ") + :Left (.. (. icons :left-arrow) " ") + :Right (.. (. icons :right-arrow) " ") + :C (.. (. icons :up-caret) " ") + :M (.. (. icons :meta) " ") + :D (.. (. icons :openbased) " ") + :S (.. (. icons :shift) " ") + :CR (.. (. icons :cr) " ") + :Esc (.. (. icons :esc) " ") + :NL (.. (. icons :cr) " ") + :BS (.. (. icons :bs) " ") + :Space (.. (. icons :space) " ") + :Tab (.. (. icons :tab) " ")}} :layout {:height {:min 4 :max 25} :width {:min 20 :max 50} :spacing 3 :align :left} - :hidden [: : : : :call :lua "^:" "^ "] :show_help true - :triggers :auto - :disable {:filetypes [:netrw]} - :triggers_blacklist {:i [:j :k] :v [:j :k]}}) + :disable {:filetypes [:netrw]}}) -(local groups {:mode [:n :v] - :d {:name :+db} - :f {:name :+find} - :g {:name :+git} - :i {:name :+diffview} - :j {:name :+diagnostics} - :l {:name :+lsp} - :o {:name :+orgmode} - :r {:name :+replace} - :s {:name :+session} - :w {:name :+worktree}}) +(local groups [{:mode [:n :v] + 1 {1 :d :group :+db} + 2 {1 :f :group :+find} + 3 {1 :g :group :+git} + 4 {1 :i :group :+diffview} + 5 {1 :j :group :+diagnostics} + 6 {1 :l :group :+lsp} + 7 {1 :o :group :+orgmode} + 8 {1 :r :group :+replace} + 9 {1 :s :group :+session} + 10 {1 :w :group :+worktree}}]) (fn config [] (let [which-key (require :which-key)] (which-key.setup opts) - (which-key.register groups))) + (which-key.add groups))) -{1 :folke/which-key.nvim :event :VeryLazy : config} +{1 :folke/which-key.nvim + :event :VeryLazy + : config + :dependencies :nvim-tree/nvim-web-devicons} diff --git a/fnl/settings/icons.fnl b/fnl/settings/icons.fnl index 6cbf106..2e40804 100644 --- a/fnl/settings/icons.fnl +++ b/fnl/settings/icons.fnl @@ -1,15 +1,20 @@ ;; Icons. -{:caret ">" +{ + :bs "󰭜" + :caret ">" :checkmark "" :close "" :cmd "" :code "" :cog "" :conflict "" + :cr "󰌑" :document "" + :down-arrow "󰁅" :down : :error "" + :esc "󱊷" :git " " :git-add "|" :git-change-delete "~" @@ -24,29 +29,37 @@ :import "" :info "" :keyboard "" + :left-arrow "󰁍" :lightning "" :line "‒" + :meta "◆" :notebook "" + :octagon "󰏄" + :octagon-filled "󰏃" + :openbased "" :orb "○" :orb-filled "●" :org "" :package "󰏗" :pentagon "󰜀" :pentagon-filled "󰜁" - :octagon "󰏄" - :octagon-filled "󰏃" :play "" :recent-files "󱋢" :right-arrow "" :search-files "󰱽" :search-project "󰺅" :search-text "󱎸" + :shift "󰘶" :sleep "󰒲" :small-right-arrow "" + :space "" :staged "" :star "" + :tab "󰌒" :telescope "" :unstaged "" + :up-caret "󰅃" + :up-arrow "" :up : :vim "" :warn "" -- cgit v1.2.3-70-g09d2