diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index dac66a2..d776489 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -5,6 +5,8 @@ if not vim.loop.fs_stat(lazypath) then vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) end + +local icons = require("user.icons").ui vim.opt.rtp:prepend(vim.env.LAZY or lazypath) vim.g.mapleader = " " vim.g.maplocalleader = " " @@ -24,10 +26,10 @@ require("lazy").setup({ throttle = 40, custom_keys = { ["l"] = false }, icons = { - ft = "", - lazy = "󰂠 ", - loaded = "", - not_loaded = "", + ft = icons.ft, + lazy = icons.Bell .. " ", + loaded = icons.CheckCircle, + not_loaded = icons.not_loaded, }, }, change_detection = { enabled = false, notify = false }, diff --git a/lua/custom/plugins/bufferline.lua b/lua/custom/plugins/bufferline.lua index c422785..130d45c 100644 --- a/lua/custom/plugins/bufferline.lua +++ b/lua/custom/plugins/bufferline.lua @@ -13,7 +13,7 @@ return { -- get folder name from current directory local _get_folder_name = function() local str = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") - return " 󱧶 " .. str:lower():gsub("^%l", string.upper) .. " " + return " " .. icons.ui.ProjekFolder .. " " .. str:lower():gsub("^%l", string.upper) .. " " end local function diagnostics_indicator(num, _, diagnostics, _) @@ -53,7 +53,7 @@ return { middle_mouse_command = nil, indicator_icon = nil, - indicator = { style = "icon", icon = "▎" }, + indicator = { style = "icon", icon = icons.ui.BoldLineLeft }, buffer_close_icon = icons.ui.Close, modified_icon = icons.ui.Circle, close_icon = icons.ui.BoldClose, diff --git a/lua/custom/plugins/lualine_backup.lua b/lua/custom/plugins/lualine_backup.lua index 69bd04f..08f1289 100644 --- a/lua/custom/plugins/lualine_backup.lua +++ b/lua/custom/plugins/lualine_backup.lua @@ -131,9 +131,9 @@ return { local get_branch = function() if vim.b.gitsigns_head ~= nil then - return " " .. vim.b.gitsigns_head + return icons.git.Branch2 .. " " .. vim.b.gitsigns_head else - return "" .. vim.fn.fnamemodify("", ":t") + return icons.git.Branch2 .. vim.fn.fnamemodify("", ":t") end end diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index b875c7a..a218488 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -2,6 +2,7 @@ local cmprg = false local cmpcalc = false local cmptag = false local lspghost_text = false +local icons = require("user.icons").ui local data_exists, custom_cmp = pcall(require, "core.config") if data_exists then cmprg = custom_cmp.cmprg @@ -104,12 +105,12 @@ return { -- documentation = cmp.config.window.bordered(), -- remove border window from cmp completion = { - border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" }, + border = icons.Border, winhighlight = "Normal:bg,FloatBorder:BorderBG,CursorLine:PmenuSel,Search:None", scrollbar = true, }, documentation = { - border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" }, + border = icons.Border, winhighlight = "Normal:bg,FloatBorder:BorderBG,CursorLine:PmenuSel,Search:None", scrollbar = true, }, diff --git a/lua/user/bufferline.lua b/lua/user/bufferline.lua index 6642c93..bd3e24b 100644 --- a/lua/user/bufferline.lua +++ b/lua/user/bufferline.lua @@ -49,7 +49,7 @@ bufferline.setup({ middle_mouse_command = nil, indicator_icon = nil, - indicator = { style = "icon", icon = "▎" }, + indicator = { style = "icon", icon = icons.ui.BoldLineLeft }, buffer_close_icon = icons.ui.Close, modified_icon = icons.ui.Circle, close_icon = icons.ui.BoldClose, diff --git a/lua/user/icons.lua b/lua/user/icons.lua index b97439a..ba7f474 100644 --- a/lua/user/icons.lua +++ b/lua/user/icons.lua @@ -51,6 +51,7 @@ return { Repo = "", Octoface = "", Branch = "", + Branch2 = "", }, ui = { ArrowCircleDown = "", @@ -133,6 +134,14 @@ return { TriangleShortArrowRight = "", TriangleShortArrowUp = "", Neovim = "", + BlankCircle = " ", + CheckCircle = " ", + DotCircle = " ", + Border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" }, + ProjekFolder = "󱧶", + Bell = "󰂠", + ft = "", + not_loaded = "", }, diagnostics = { BoldError = "", diff --git a/lua/user/lsp/mason.lua b/lua/user/lsp/mason.lua index 1f309ac..ae69c32 100644 --- a/lua/user/lsp/mason.lua +++ b/lua/user/lsp/mason.lua @@ -26,17 +26,19 @@ if data_ok then end end +local icons = require("user.icons").ui + local settings = { ui = { -- border = "none", - border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" }, + border = icons.Border, icons = { -- package_installed = "◍", -- package_pending = "◍", -- package_uninstalled = "◍", - package_pending = " ", - package_installed = " ", - package_uninstalled = " ", + package_pending = icons.DotCircle, + package_installed = icons.CheckCircle, + package_uninstalled = icons.BlankCircle, }, keymaps = { -- Keymap to expand a server in the UI