]> git.rmz.io Git - dotfiles.git/commitdiff
lazyvim: absorb icons into rmz.util.ui
authorSamir Benmendil <me@rmz.io>
Sun, 16 Feb 2025 11:35:25 +0000 (11:35 +0000)
committerSamir Benmendil <me@rmz.io>
Sun, 2 Mar 2025 16:05:27 +0000 (16:05 +0000)
nvim/lua/plugins/blink.lua
nvim/lua/plugins/ui.lua
nvim/lua/rmz/util/init.lua
nvim/lua/rmz/util/ui.lua [new file with mode: 0644]

index 6de3b6841c1590c1e005c0f3ce24c5c46e5895ee..bdfee753e9b1cbd52b92ac2d6deb6f629083020b 100644 (file)
@@ -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,
   },
 
index afe5855d1ef3188bdc15b1a4b3016636fb4b1b14..05ab3dfe94ee69f0adc106c0c71e203a7454b4b8 100644 (file)
@@ -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,
index 8c21c0974647e7d8c9cf06ad98334add8677909c..9ef8cb32bd140ddf0a2d0c74d01ad0d9a346b761 100644 (file)
@@ -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 (file)
index 0000000..024ec05
--- /dev/null
@@ -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