From dc8156c52c53924bf845eb01345017cb92c6fbf6 Mon Sep 17 00:00:00 2001 From: Abdulrahman Sheikho Date: Thu, 12 Mar 2026 10:52:09 +0300 Subject: [PATCH] setup: add icons additionally set `which-key` to have `helix` look. --- lua/core/globals.lua | 72 ++++++++++++++++++++++++++++++++++++++- lua/core/lazy-nvim.lua | 16 +-------- lua/plugins/blink.lua | 1 + lua/plugins/telescope.lua | 4 +-- lua/plugins/which-key.lua | 4 ++- 5 files changed, 78 insertions(+), 19 deletions(-) diff --git a/lua/core/globals.lua b/lua/core/globals.lua index f412c3f6..0f617e74 100644 --- a/lua/core/globals.lua +++ b/lua/core/globals.lua @@ -6,7 +6,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- Configs for Programming Languages -- like LSPs, Tree-sitters, Linters, Fromatters, Debuggers, etc. @@ -82,3 +82,73 @@ Langs = { }, }, } + +-- My set of defined icons, I still don't know if its inclusive or not. +-- I named it Glyphs to avoid misinterpreting it with something else. +Glyphs = { + ui = { + prompt = '', + }, + lazy = { + cmd = ' ', + config = '', + debug = '● ', + event = ' ', + favorite = ' ', + ft = ' ', + init = ' ', + import = ' ', + keys = ' ', + lazy = '󰒲 ', + loaded = '●', + not_loaded = '○', + plugin = ' ', + runtime = ' ', + require = ' ', + source = ' ', + start = ' ', + task = ' ', + list = { '●', '○', '◆', '◇' }, + }, + kinds = { + -- taken from: + -- - [Completion.Kind (LSP APIs)](https://bits.netbeans.org/29/javadoc/org-netbeans-api-lsp/org/netbeans/api/lsp/Completion.Kind.html) + -- - [StructureElement.Kind (LSP APIs)](https://bits.netbeans.org/29/javadoc/org-netbeans-api-lsp/org/netbeans/api/lsp/StructureElement.Kind.html) + Array = '', + Boolean = '', + Class = '󰒕', + Color = '󰏘', + Constant = '󰏿', + Constructor = '󱌣', + Copilot = '', -- for AI indication + Enum = '', -- or   + EnumMember = '', -- or   + Event = '', + Field = '󰿨', + File = '󰈙', + Folder = '󰉋', + Function = '󰊕', + Interface = '󰩦', -- or 󱖡 + Key = '', + Keyword = '', + Method = 'ɱ', -- or ꬺ, I can't decide + Module = '󰅩', + Namespace = '󰦮', + Null = '∅', + Number = '󰎠', + Object = '󰮄', --  would more appropriate + Operator = '', + Package = '󰏗', + Property = '󰆦', + Reference = '󰬲', + Snippet = '󱄽', + String = '󱀍', -- or  󰀬 + Struct = '󰓸', -- or 󰙅 󰆩 + Text = '󰉿', + TypeParameter = '', + Unit = '󰑭', + Unknown = '', -- for Unknown values + Value = '󰼢', + Variable = '󰀫', + }, +} diff --git a/lua/core/lazy-nvim.lua b/lua/core/lazy-nvim.lua index b28bec11..7d55d7c0 100644 --- a/lua/core/lazy-nvim.lua +++ b/lua/core/lazy-nvim.lua @@ -85,20 +85,6 @@ require('lazy').setup({ ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table - icons = vim.g.have_nerd_font and {} or { - cmd = '⌘', - config = '🛠', - event = '📅', - ft = '📂', - init = '⚙', - keys = '🗝', - plugin = '🔌', - runtime = '💻', - require = '🌙', - source = '📄', - start = '🚀', - task = '📌', - lazy = '💤 ', - }, + icons = Glyphs.lazy, }, }) diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index d4161b79..d6e0bb11 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -118,6 +118,7 @@ return { -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' -- Adjusts spacing to ensure icons are aligned nerd_font_variant = 'mono', + kind_icons = Glyphs.kinds, }, completion = { diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 6407a6ef..6072e36e 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -59,8 +59,8 @@ return { -- All the info you're looking for is in `:help telescope.setup()` -- defaults = { - prompt_prefix = ' ', - selection_caret = ' ', + prompt_prefix = Glyphs.ui.prompt .. ' ', + selection_caret = Glyphs.ui.prompt .. ' ', sorting_strategy = 'ascending', layout_strategy = 'flex', layout_config = { diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua index 809d7137..4a096e85 100644 --- a/lua/plugins/which-key.lua +++ b/lua/plugins/which-key.lua @@ -6,9 +6,11 @@ return { ---@type wk.Opts ---@diagnostic disable-next-line: missing-fields opts = { + -- set which-key layout to look like 'helix' + preset = 'helix', -- delay between pressing a key and opening which-key (milliseconds) delay = 0, - icons = { mappings = vim.g.have_nerd_font }, + icons = { mappings = false }, -- Document existing key chains spec = {