From 7df25e8ce3e98e4cb56c5eb47c6ada1f414e083c Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sat, 20 May 2023 00:08:22 +0200 Subject: Add icons file --- fnl/plugins/editor/gitsigns.fnl | 12 +++++++----- fnl/plugins/editor/telescope.fnl | 8 +++++--- fnl/plugins/editor/trouble.fnl | 17 +++++++++++------ fnl/plugins/editor/which-key.fnl | 6 +++++- 4 files changed, 28 insertions(+), 15 deletions(-) (limited to 'fnl/plugins/editor') diff --git a/fnl/plugins/editor/gitsigns.fnl b/fnl/plugins/editor/gitsigns.fnl index e0551e6..0634138 100644 --- a/fnl/plugins/editor/gitsigns.fnl +++ b/fnl/plugins/editor/gitsigns.fnl @@ -51,24 +51,26 @@ [mode key cmd desc] (vim.keymap.set mode key cmd (vim.tbl_extend :force {:buffer bufnr} desc))))) +(local icons (require :plugins.icons)) + (local signs {:add {:hl :GitSignsAdd - :text "|" + :text (. icons :git-add) :numhl :GitSignsAddNr :linehl :GitSignsAddLn} :change {:hl :GitSignsChange - :text "|" + :text (. icons :git-add) :numhl :GitSignsChangeNr :linehl :GitSignsChangeLn} :delete {:hl :GitSignsDelete - :text "_" + :text (. icons :git-delete) :numhl :GitSignsDeleteNr :linehl :GitSignsDeleteLn} :topdelete {:hl :GitSignsDelete - :text "‾" + :text (. icons :git-top-delete) :numhl :GitSignsDeleteNr :linehl :GitSignsDeleteLn} :changedelete {:hl :GitSignsChange - :text "~" + :text (. icons :git-change-delete) :numhl :GitSignsChangeNr :linehl :GitSignsChangeLn}}) diff --git a/fnl/plugins/editor/telescope.fnl b/fnl/plugins/editor/telescope.fnl index 9c17aeb..d662b87 100644 --- a/fnl/plugins/editor/telescope.fnl +++ b/fnl/plugins/editor/telescope.fnl @@ -59,9 +59,11 @@ (fn setup [] (let [telescope (require :telescope) - actions (require :telescope.actions)] - (telescope.setup {:defaults {:prompt_prefix "  " - :selection_caret "> " + actions (require :telescope.actions) + icons (require :plugins.icons)] + (telescope.setup {:defaults {:prompt_prefix (.. " " (. icons :telescope) + " ") + :selection_caret (.. (. icons :caret) " ") :path_display [:smart] :color_devicons false :pickers {:find_files {:theme :dropdown}} diff --git a/fnl/plugins/editor/trouble.fnl b/fnl/plugins/editor/trouble.fnl index 5c989de..7136787 100644 --- a/fnl/plugins/editor/trouble.fnl +++ b/fnl/plugins/editor/trouble.fnl @@ -1,5 +1,7 @@ ;; Pretty diagnostics. +(local icons (require :plugins.icons)) + (local opts {:position :bottom ;; position of the list can be: bottom, top, left, right :height 10 @@ -69,15 +71,18 @@ :auto_jump [:lsp_definitions] ;; for the given modes, automatically jump if there is only a single result :signs {;; icons / text used for a diagnostic - :error "" - :warning "" - :hint "" - :information "" - :other "﫠"} + :error (. icons :error) + :warning (. icons :warn) + :hint (. icons :hint) + :information (. icons :info) + :other (. icons :other)} :use_diagnostic_signs false ;; enabling this will use the signs defined in your lsp client }) {1 :folke/trouble.nvim - :keys [{1 :jt 2 :TroubleToggle :desc :Trouble}] + :cmd [:Trouble :TroubleToggle] + :keys [{1 :jt + 2 "TroubleToggle workspace_diagnostics" + :desc :Trouble}] : opts} diff --git a/fnl/plugins/editor/which-key.fnl b/fnl/plugins/editor/which-key.fnl index 9ea8ff8..76f6e47 100644 --- a/fnl/plugins/editor/which-key.fnl +++ b/fnl/plugins/editor/which-key.fnl @@ -1,5 +1,7 @@ ;; Which-key provides a pop-up menu for some key mappings. +(local icons (require :plugins.icons)) + (local opts {:plugins {:marks true :registers true :spelling {:enabled true :suggestions 20} @@ -10,7 +12,9 @@ :nav true :z true :g true}} - :icons {:breadcrumb "»" :separator " " :group "+"} + :icons {:breadcrumb (. icons :guillemet) + :separator (.. (. icons :small-right-arrow) " ") + :group "+"} :popup_mappings {:scroll_down : :scroll_up :} :window {:border :rounded :position :bottom :winblend 0} :layout {:height {:min 4 :max 25} -- cgit v1.2.3-70-g09d2