From: Samir Benmendil Date: Sun, 16 Feb 2025 11:35:25 +0000 (+0000) Subject: lazyvim: absorb icons into rmz.util.ui X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/b47ffe60e244c9165f40371736079320ea2d848b lazyvim: absorb icons into rmz.util.ui --- diff --git a/nvim/lua/plugins/blink.lua b/nvim/lua/plugins/blink.lua index 6de3b68..bdfee75 100644 --- a/nvim/lua/plugins/blink.lua +++ b/nvim/lua/plugins/blink.lua @@ -43,7 +43,7 @@ return { "saghen/blink.cmp", opts = function(_, opts) opts.appearance = opts.appearance or {} - opts.appearance.kind_icons = vim.tbl_extend("force", opts.appearance.kind_icons or {}, LazyVim.config.icons.kinds) + opts.appearance.kind_icons = vim.tbl_extend("force", opts.appearance.kind_icons or {}, rmz.ui.icons.kinds) end, }, diff --git a/nvim/lua/plugins/ui.lua b/nvim/lua/plugins/ui.lua index afe5855..05ab3df 100644 --- a/nvim/lua/plugins/ui.lua +++ b/nvim/lua/plugins/ui.lua @@ -136,7 +136,7 @@ return { diagnostics = "nvim_lsp", always_show_bufferline = false, diagnostics_indicator = function(_, _, diag) - local icons = LazyVim.config.icons.diagnostics + local icons = rmz.ui.icons.diagnostics local ret = (diag.error and icons.Error .. diag.error .. " " or "") .. (diag.warning and icons.Warn .. diag.warning or "") return vim.trim(ret) @@ -151,7 +151,7 @@ return { }, ---@param opts bufferline.IconFetcherOpts get_element_icon = function(opts) - return LazyVim.config.icons.ft[opts.filetype] + return rmz.ui.icons.ft[opts.filetype] end, }, }, @@ -181,7 +181,7 @@ return { local lualine_require = require("lualine_require") lualine_require.require = require - local icons = LazyVim.config.icons + local icons = rmz.ui.icons vim.o.laststatus = vim.g.lualine_laststatus @@ -341,7 +341,7 @@ return { separator = " ", highlight = true, depth_limit = 5, - icons = LazyVim.config.icons.kinds, + icons = rmz.ui.icons.kinds, lazy_update_context = true, } end, diff --git a/nvim/lua/rmz/util/init.lua b/nvim/lua/rmz/util/init.lua index 8c21c09..9ef8cb3 100644 --- a/nvim/lua/rmz/util/init.lua +++ b/nvim/lua/rmz/util/init.lua @@ -1,5 +1,7 @@ ---@class rmz.util -local M = {} +local M = { + ui = require("rmz.util.ui"), +} --- Deduplicates a list. ---@generic T diff --git a/nvim/lua/rmz/util/ui.lua b/nvim/lua/rmz/util/ui.lua new file mode 100644 index 0000000..024ec05 --- /dev/null +++ b/nvim/lua/rmz/util/ui.lua @@ -0,0 +1,72 @@ +local M = {} + +-- icons used by other plugins +M.icons = { + misc = { + dots = "󰇘", + }, + ft = { + octo = "", + }, + dap = { + Stopped = { "󰁕 ", "DiagnosticWarn", "DapStoppedLine" }, + Breakpoint = " ", + BreakpointCondition = " ", + BreakpointRejected = { " ", "DiagnosticError" }, + LogPoint = ".>", + }, + diagnostics = { + Error = " ", + Warn = " ", + Hint = " ", + Info = " ", + }, + git = { + added = " ", + modified = " ", + removed = " ", + }, + kinds = { + Array = " ", + Boolean = "󰨙 ", + Class = " ", + Codeium = "󰘦 ", + Color = " ", + Control = " ", + Collapsed = " ", + Constant = "󰏿 ", + Constructor = " ", + Copilot = " ", + Enum = " ", + EnumMember = " ", + Event = " ", + Field = " ", + File = " ", + Folder = " ", + Function = "󰊕 ", + Interface = " ", + Key = " ", + Keyword = " ", + Method = "󰊕 ", + Module = " ", + Namespace = "󰦮 ", + Null = " ", + Number = "󰎠 ", + Object = " ", + Operator = " ", + Package = " ", + Property = " ", + Reference = " ", + Snippet = "󱄽 ", + String = " ", + Struct = "󰆼 ", + Supermaven = " ", + TabNine = "󰏚 ", + Text = " ", + TypeParameter = " ", + Unit = " ", + Value = " ", + Variable = "󰀫 ", + }, +} +return M