summaryrefslogtreecommitdiff
path: root/lua/lvim/core
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lvim/core')
-rw-r--r--lua/lvim/core/alpha/dashboard.lua16
-rw-r--r--lua/lvim/core/alpha/startify.lua2
-rw-r--r--lua/lvim/core/breadcrumbs.lua41
-rw-r--r--lua/lvim/core/bufferline.lua18
-rw-r--r--lua/lvim/core/cmp.lua30
-rw-r--r--lua/lvim/core/dap.lua6
-rw-r--r--lua/lvim/core/gitsigns.lua10
-rw-r--r--lua/lvim/core/indentlines.lua2
-rw-r--r--lua/lvim/core/info.lua14
-rw-r--r--lua/lvim/core/lir.lua2
-rw-r--r--lua/lvim/core/lualine/components.lua31
-rw-r--r--lua/lvim/core/lualine/styles.lua10
-rw-r--r--lua/lvim/core/notify.lua10
-rw-r--r--lua/lvim/core/nvimtree.lua36
-rw-r--r--lua/lvim/core/telescope.lua4
-rw-r--r--lua/lvim/core/which-key.lua6
16 files changed, 101 insertions, 137 deletions
diff --git a/lua/lvim/core/alpha/dashboard.lua b/lua/lvim/core/alpha/dashboard.lua
index debf88a7..5e73206f 100644
--- a/lua/lvim/core/alpha/dashboard.lua
+++ b/lua/lvim/core/alpha/dashboard.lua
@@ -113,12 +113,16 @@ function M.get_sections()
end
buttons = {
val = {
- button("f", "๏œ Find File", "<CMD>Telescope find_files<CR>"),
- button("n", "๏œ“ New File", "<CMD>ene!<CR>"),
- button("p", "๏ Projects ", "<CMD>Telescope projects<CR>"),
- button("r", "๏˜ˆ Recent files", ":Telescope oldfiles <CR>"),
- button("t", "๏žƒ Find Text", "<CMD>Telescope live_grep<CR>"),
- button("c", "๎˜• Configuration", "<CMD>edit " .. require("lvim.config"):get_user_config_path() .. " <CR>"),
+ button("f", lvim.icons.ui.FindFile .. " Find File", "<CMD>Telescope find_files<CR>"),
+ button("n", lvim.icons.ui.NewFile .. " New File", "<CMD>ene!<CR>"),
+ button("p", lvim.icons.ui.Project .. " Projects ", "<CMD>Telescope projects<CR>"),
+ button("r", lvim.icons.ui.History .. " Recent files", ":Telescope oldfiles <CR>"),
+ button("t", lvim.icons.ui.FindText .. " Find Text", "<CMD>Telescope live_grep<CR>"),
+ button(
+ "c",
+ lvim.icons.ui.Gear .. " Configuration",
+ "<CMD>edit " .. require("lvim.config"):get_user_config_path() .. " <CR>"
+ ),
},
}
end
diff --git a/lua/lvim/core/alpha/startify.lua b/lua/lvim/core/alpha/startify.lua
index 2ea541f5..b1e83d1d 100644
--- a/lua/lvim/core/alpha/startify.lua
+++ b/lua/lvim/core/alpha/startify.lua
@@ -19,7 +19,7 @@ function M.get_sections()
local top_buttons = {
entries = {
- { "e", "๏œ“ New File", "<CMD>ene!<CR>" },
+ { "e", lvim.icons.ui.NewFile .. " New File", "<CMD>ene!<CR>" },
},
val = {},
}
diff --git a/lua/lvim/core/breadcrumbs.lua b/lua/lvim/core/breadcrumbs.lua
index 23b516db..dd7f5163 100644
--- a/lua/lvim/core/breadcrumbs.lua
+++ b/lua/lvim/core/breadcrumbs.lua
@@ -7,42 +7,7 @@ M.config = function()
active = false,
on_config_done = nil,
options = {
- icons = {
- Text = "๏พ ",
- Method = "๏šฆ ",
- Function = "๏šฆ ",
- Constructor = "๏šฆ ",
- Field = "๎œ– ",
- Variable = "๎œ– ",
- Class = "๏ – ",
- Interface = "๏ƒจ ",
- Module = "๏™จ ",
- Property = "๏‚ญ ",
- Unit = "๎ˆŸ ",
- Value = "๏ขŸ ",
- Enum = "๏… ",
- Keyword = "๏ง ",
- Snippet = "๏— ",
- Color = "๏ฃ— ",
- File = "๏œ˜ ",
- Reference = "๏’ ",
- Folder = "๏Š ",
- EnumMember = "๏… ",
- Constant = "๏›ผ ",
- Struct = "๏†ณ ",
- Event = "๏ƒง ",
- Operator = "๏š” ",
- TypeParameter = "๏žƒ ",
- Array = "๏™ง ",
- Number = "๏Š’ ",
- String = "๏พ ",
- Boolean = "๏จ ",
- Object = "๏™จ ",
- Package = "๏’‡ ",
- Namespace = "๏™จ",
- Key = "๏พ",
- Null = "๏ณ ",
- },
+ icons = lvim.icons.kind,
highlight = true,
separator = " " .. ">" .. " ",
depth_limit = 0,
@@ -107,7 +72,7 @@ M.get_filename = function()
vim.api.nvim_set_hl(0, hl_group, { fg = file_icon_color })
if f.isempty(file_icon) then
- file_icon = "๏œ˜"
+ file_icon = lvim.icons.kind.File
end
local navic_text = vim.api.nvim_get_hl_by_name("Normal", true)
@@ -165,7 +130,7 @@ M.get_winbar = function()
if not f.isempty(value) and f.get_buf_option "mod" then
-- TODO: replace with circle
- local mod = "%#LspCodeLens#" .. "๏„‘" .. "%*"
+ local mod = "%#LspCodeLens#" .. lvim.icons.ui.Circle .. "%*"
if gps_added then
value = value .. " " .. mod
else
diff --git a/lua/lvim/core/bufferline.lua b/lua/lvim/core/bufferline.lua
index 6ae0d6c6..b8143813 100644
--- a/lua/lvim/core/bufferline.lua
+++ b/lua/lvim/core/bufferline.lua
@@ -6,7 +6,11 @@ end
local function diagnostics_indicator(num, _, diagnostics, _)
local result = {}
- local symbols = { error = "๏™™", warning = "๏”ฉ", info = "๏ ต" }
+ local symbols = {
+ error = lvim.icons.diagnostics.Error,
+ warning = lvim.icons.diagnostics.Warning,
+ info = lvim.icons.diagnostics.Information,
+ }
if not lvim.use_icons then
return "(" .. num .. ")"
end
@@ -59,14 +63,14 @@ M.config = function()
left_mouse_command = "buffer %d", -- can be a string | function, see "Mouse actions"
middle_mouse_command = nil, -- can be a string | function, see "Mouse actions"
indicator = {
- icon = "โ–Ž", -- this should be omitted if indicator style is not 'icon'
+ icon = lvim.icons.ui.BoldLineLeft, -- this should be omitted if indicator style is not 'icon'
style = "icon", -- can also be 'underline'|'none',
},
- buffer_close_icon = "๏™•",
- modified_icon = "โ—",
- close_icon = "๏€",
- left_trunc_marker = "๏‚จ",
- right_trunc_marker = "๏‚ฉ",
+ buffer_close_icon = lvim.icons.ui.Close,
+ modified_icon = lvim.icons.ui.Circle,
+ close_icon = lvim.icons.ui.BoldClose,
+ left_trunc_marker = lvim.icons.ui.ArrowCircleLeft,
+ right_trunc_marker = lvim.icons.ui.ArrowCircleRight,
--- name_formatter can be used to change the buffer's label in the bufferline.
--- Please note some names can/will break the
--- bufferline so use this at your discretion knowing that it has
diff --git a/lua/lvim/core/cmp.lua b/lua/lvim/core/cmp.lua
index a6362aa7..319bdc64 100644
--- a/lua/lvim/core/cmp.lua
+++ b/lua/lvim/core/cmp.lua
@@ -141,33 +141,7 @@ M.config = function()
formatting = {
fields = { "kind", "abbr", "menu" },
max_width = 0,
- kind_icons = {
- Class = "๏ – ",
- Color = "๎ˆซ ",
- Constant = "๏ฒ€ ",
- Constructor = "๏ฅ ",
- Enum = "๏ฉ—",
- EnumMember = "๏… ",
- Event = "๏ƒง ",
- Field = "๎œ– ",
- File = "๏œ˜",
- Folder = "๏Š ",
- Function = "๏ž” ",
- Interface = "๏ฐฎ ",
- Keyword = "๏ Š ",
- Method = "๎ƒŒ ",
- Module = "๏™จ ",
- Operator = "๏š”",
- Property = "๎˜ค ",
- Reference = "๏œœ ",
- Snippet = "๏ƒ„ ",
- Struct = "๏ƒŠ ",
- Text = "๏พ ",
- TypeParameter = "๏žƒ ",
- Unit = "๏ฅฌ",
- Value = "๏ขŸ ",
- Variable = "๏šฆ ",
- },
+ kind_icons = lvim.icons.kind,
source_names = {
nvim_lsp = "(LSP)",
emoji = "(Emoji)",
@@ -189,7 +163,7 @@ M.config = function()
format = function(entry, vim_item)
local max_width = lvim.builtin.cmp.formatting.max_width
if max_width ~= 0 and #vim_item.abbr > max_width then
- vim_item.abbr = string.sub(vim_item.abbr, 1, max_width - 1) .. "โ€ฆ"
+ vim_item.abbr = string.sub(vim_item.abbr, 1, max_width - 1) .. lvim.icons.ui.Ellipsis
end
if lvim.use_icons then
vim_item.kind = lvim.builtin.cmp.formatting.kind_icons[vim_item.kind]
diff --git a/lua/lvim/core/dap.lua b/lua/lvim/core/dap.lua
index 727e238f..9e629cda 100644
--- a/lua/lvim/core/dap.lua
+++ b/lua/lvim/core/dap.lua
@@ -5,19 +5,19 @@ M.config = function()
active = false,
on_config_done = nil,
breakpoint = {
- text = "๏—ฃ",
+ text = lvim.icons.ui.Bug,
texthl = "LspDiagnosticsSignError",
linehl = "",
numhl = "",
},
breakpoint_rejected = {
- text = "๏—ฃ",
+ text = lvim.icons.ui.Bug,
texthl = "LspDiagnosticsSignHint",
linehl = "",
numhl = "",
},
stopped = {
- text = "๏ก",
+ text = lvim.icons.ui.BoldArrowRight,
texthl = "LspDiagnosticsSignInformation",
linehl = "DiagnosticUnderlineInfo",
numhl = "LspDiagnosticsSignInformation",
diff --git a/lua/lvim/core/gitsigns.lua b/lua/lvim/core/gitsigns.lua
index 0365fc69..43ec7504 100644
--- a/lua/lvim/core/gitsigns.lua
+++ b/lua/lvim/core/gitsigns.lua
@@ -8,31 +8,31 @@ M.config = function()
signs = {
add = {
hl = "GitSignsAdd",
- text = "โ–Ž",
+ text = lvim.icons.ui.BoldLineLeft,
numhl = "GitSignsAddNr",
linehl = "GitSignsAddLn",
},
change = {
hl = "GitSignsChange",
- text = "โ–Ž",
+ text = lvim.icons.ui.BoldLineLeft,
numhl = "GitSignsChangeNr",
linehl = "GitSignsChangeLn",
},
delete = {
hl = "GitSignsDelete",
- text = "๏ค‰",
+ text = lvim.icons.ui.Triangle,
numhl = "GitSignsDeleteNr",
linehl = "GitSignsDeleteLn",
},
topdelete = {
hl = "GitSignsDelete",
- text = "๏ค‰",
+ text = lvim.icons.ui.Triangle,
numhl = "GitSignsDeleteNr",
linehl = "GitSignsDeleteLn",
},
changedelete = {
hl = "GitSignsChange",
- text = "โ–Ž",
+ text = lvim.icons.ui.BoldLineLeft,
numhl = "GitSignsChangeNr",
linehl = "GitSignsChangeLn",
},
diff --git a/lua/lvim/core/indentlines.lua b/lua/lvim/core/indentlines.lua
index ab316a9b..dc4a72ba 100644
--- a/lua/lvim/core/indentlines.lua
+++ b/lua/lvim/core/indentlines.lua
@@ -17,7 +17,7 @@ M.config = function()
"Trouble",
"text",
},
- char = "โ–",
+ char = lvim.icons.ui.LineLeft,
show_trailing_blankline_indent = false,
show_first_indent_level = true,
use_treesitter = true,
diff --git a/lua/lvim/core/info.lua b/lua/lvim/core/info.lua
index da9ddbe6..c413f0f1 100644
--- a/lua/lvim/core/info.lua
+++ b/lua/lvim/core/info.lua
@@ -25,8 +25,8 @@ local function make_formatters_info(ft)
"Formatters info",
fmt(
"* Active: %s%s",
- table.concat(registered_formatters, " ๏† , "),
- vim.tbl_count(registered_formatters) > 0 and " ๏† " or ""
+ table.concat(registered_formatters, " " .. lvim.icons.ui.BoxChecked .. " , "),
+ vim.tbl_count(registered_formatters) > 0 and " " .. lvim.icons.ui.BoxChecked .. " " or ""
),
fmt("* Supported: %s", str_list(supported_formatters)),
}
@@ -41,8 +41,8 @@ local function make_code_actions_info(ft)
"Code actions info",
fmt(
"* Active: %s%s",
- table.concat(registered_actions, " ๏† , "),
- vim.tbl_count(registered_actions) > 0 and " ๏† " or ""
+ table.concat(registered_actions, " " .. lvim.icons.ui.BoxChecked .. " , "),
+ vim.tbl_count(registered_actions) > 0 and " " .. lvim.icons.ui.BoxChecked .. " " or ""
),
}
@@ -57,8 +57,8 @@ local function make_linters_info(ft)
"Linters info",
fmt(
"* Active: %s%s",
- table.concat(registered_linters, " ๏† , "),
- vim.tbl_count(registered_linters) > 0 and " ๏† " or ""
+ table.concat(registered_linters, " " .. lvim.icons.ui.BoxChecked .. " , "),
+ vim.tbl_count(registered_linters) > 0 and " " .. lvim.icons.ui.BoxChecked .. " " or ""
),
fmt("* Supported: %s", str_list(supported_linters)),
}
@@ -202,7 +202,7 @@ function M.toggle_popup(ft)
vim.fn.matchadd("LvimInfoIdentifier", " " .. ft .. "$")
vim.fn.matchadd("string", "true")
vim.fn.matchadd("string", "active")
- vim.fn.matchadd("string", "๏†")
+ vim.fn.matchadd("string", lvim.icons.ui.BoxChecked)
vim.fn.matchadd("boolean", "inactive")
vim.fn.matchadd("error", "false")
tbl_set_highlight(require("lvim.lsp.null-ls.formatters").list_registered(ft), "LvimInfoIdentifier")
diff --git a/lua/lvim/core/lir.lua b/lua/lvim/core/lir.lua
index a47c40b6..af9eb549 100644
--- a/lua/lvim/core/lir.lua
+++ b/lua/lvim/core/lir.lua
@@ -85,7 +85,7 @@ M.config = function()
-- custom folder icon
reload("nvim-web-devicons").set_icon {
lir_folder_icon = {
- icon = "๎—ฟ",
+ icon = lvim.icons.ui.Folder,
color = "#42A5F5",
name = "LirFolderNode",
},
diff --git a/lua/lvim/core/lualine/components.lua b/lua/lvim/core/lualine/components.lua
index 5f29d4ef..badece1e 100644
--- a/lua/lvim/core/lualine/components.lua
+++ b/lua/lvim/core/lualine/components.lua
@@ -21,25 +21,25 @@ vim.api.nvim_set_hl(0, "SLBranchName", { fg = normal_hl.foreground, bg = cursorl
vim.api.nvim_set_hl(0, "SLProgress", { fg = "#ECBE7B", bg = statusline_hl.background })
local location_color = nil
-local branch = "๎œฅ"
-local separator = "โ”‚"
+local branch = lvim.icons.git.Branch
+local separator = lvim.icons.ui.LineMiddle
if lvim.colorscheme == "tokyonight" then
location_color = "SLBranchName"
- branch = "%#SLGitIcon#" .. "๎œฅ" .. "%*" .. "%#SLBranchName#"
+ branch = "%#SLGitIcon#" .. lvim.icons.git.Branch .. "%*" .. "%#SLBranchName#"
local status_ok, tnc = pcall(require, "tokyonight.colors")
if status_ok then
local tncolors = tnc.setup { transform = true }
vim.api.nvim_set_hl(0, "SLSeparator", { fg = cursorline_hl.background, bg = tncolors.black })
- separator = "%#SLSeparator#" .. "โ”‚" .. "%*"
+ separator = "%#SLSeparator#" .. lvim.icons.ui.LineMiddle .. "%*"
end
end
return {
mode = {
function()
- return " ๏”— "
+ return " " .. lvim.icons.ui.Target .. " "
end,
padding = { left = 0, right = 0 },
color = {},
@@ -58,7 +58,11 @@ return {
diff = {
"diff",
source = diff_source,
- symbols = { added = "๏ƒพ ", modified = "๏‘™ ", removed = "๏…† " },
+ symbols = {
+ added = lvim.icons.git.LineAdded .. " ",
+ modified = lvim.icons.git.LineModified .. " ",
+ removed = lvim.icons.git.LineRemoved .. " ",
+ },
padding = { left = 2, right = 1 },
diff_color = {
added = { fg = colors.green },
@@ -73,7 +77,9 @@ return {
if vim.bo.filetype == "python" then
local venv = os.getenv "CONDA_DEFAULT_ENV" or os.getenv "VIRTUAL_ENV"
if venv then
- return string.format(" ๎˜† (%s)", utils.env_cleanup(venv))
+ local icons = require "nvim-web-devicons"
+ local py_icon, _ = icons.get_icon ".py"
+ return string.format(" " .. py_icon .. " (%s)", utils.env_cleanup(venv))
end
end
return ""
@@ -84,12 +90,17 @@ return {
diagnostics = {
"diagnostics",
sources = { "nvim_diagnostic" },
- symbols = { error = "๏— ", warn = "๏ฑ ", info = "๏ช ", hint = "๏ ต " },
+ symbols = {
+ error = lvim.icons.diagnostics.BoldError .. " ",
+ warn = lvim.icons.diagnostics.BoldWarning .. " ",
+ info = lvim.icons.diagnostics.BoldInformation .. " ",
+ hint = lvim.icons.diagnostics.BoldHint .. " ",
+ },
-- cond = conditions.hide_in_width,
},
treesitter = {
function()
- return "๏†ป"
+ return lvim.icons.ui.Tree
end,
color = function()
local buf = vim.api.nvim_get_current_buf()
@@ -148,7 +159,7 @@ return {
spaces = {
function()
local shiftwidth = vim.api.nvim_buf_get_option(0, "shiftwidth")
- return "๏ ‘ " .. shiftwidth
+ return lvim.icons.ui.Tab .. " " .. shiftwidth
end,
separator = separator,
padding = 1,
diff --git a/lua/lvim/core/lualine/styles.lua b/lua/lvim/core/lualine/styles.lua
index 0d759c95..8cde37c4 100644
--- a/lua/lvim/core/lualine/styles.lua
+++ b/lua/lvim/core/lualine/styles.lua
@@ -43,8 +43,14 @@ styles.default = {
theme = "auto",
globalstatus = true,
icons_enabled = lvim.use_icons,
- component_separators = { left = "๎‚ฑ", right = "๎‚ณ" },
- section_separators = { left = "๎‚ฐ", right = "๎‚ฒ" },
+ component_separators = {
+ left = lvim.icons.ui.DividerRight,
+ right = lvim.icons.ui.DividerLeft,
+ },
+ section_separators = {
+ left = lvim.icons.ui.BoldDividerRight,
+ right = lvim.icons.ui.BoldDividerLeft,
+ },
disabled_filetypes = {},
},
sections = {
diff --git a/lua/lvim/core/notify.lua b/lua/lvim/core/notify.lua
index 72133c27..272fdced 100644
--- a/lua/lvim/core/notify.lua
+++ b/lua/lvim/core/notify.lua
@@ -29,11 +29,11 @@ local defaults = {
---@usage Icons for the different levels
icons = {
- ERROR = "๏™™",
- WARN = "๏”ฉ",
- INFO = "๏ ต",
- DEBUG = "๏†ˆ",
- TRACE = "โœŽ",
+ ERROR = lvim.icons.diagnostics.Error,
+ WARN = lvim.icons.diagnostics.Warning,
+ INFO = lvim.icons.diagnostics.Information,
+ DEBUG = lvim.icons.diagnostics.Debug,
+ TRACE = lvim.icons.diagnostics.Trace,
},
},
}
diff --git a/lua/lvim/core/nvimtree.lua b/lua/lvim/core/nvimtree.lua
index 2d186829..e4b20804 100644
--- a/lua/lvim/core/nvimtree.lua
+++ b/lua/lvim/core/nvimtree.lua
@@ -20,10 +20,10 @@ function M.config()
enable = lvim.use_icons,
show_on_dirs = false,
icons = {
- hint = "๏ช",
- info = "๏š",
- warning = "๏ฑ",
- error = "๏—",
+ hint = lvim.icons.diagnostics.BoldHint,
+ info = lvim.icons.diagnostics.BoldInformation,
+ warning = lvim.icons.diagnostics.BoldWarning,
+ error = lvim.icons.diagnostics.BoldError,
},
},
update_focused_file = {
@@ -71,23 +71,23 @@ function M.config()
folder_arrow = lvim.use_icons,
},
glyphs = {
- default = "๎˜’",
- symlink = "๏’",
+ default = lvim.icons.ui.Text,
+ symlink = lvim.icons.ui.FileSymlink,
git = {
- unstaged = "๏‘„",
- staged = "S",
- unmerged = "๎œง",
- renamed = "โžœ",
- deleted = "๏‘˜",
- untracked = "U",
- ignored = "โ—Œ",
+ deleted = lvim.icons.git.FileDeleted,
+ ignored = lvim.icons.git.FileIgnored,
+ renamed = lvim.icons.git.FileRenamed,
+ staged = lvim.icons.git.FileStaged,
+ unmerged = lvim.icons.git.FileUnmerged,
+ unstaged = lvim.icons.git.FileUnstaged,
+ untracked = lvim.icons.git.FileUntracked,
},
folder = {
- default = "๎—ฟ",
- open = "๎—พ",
- empty = "๏„”",
- empty_open = "๏„•",
- symlink = "๏’‚",
+ default = lvim.icons.ui.Folder,
+ empty = lvim.icons.ui.EmptyFolder,
+ empty_open = lvim.icons.ui.EmptyFolderOpen,
+ open = lvim.icons.ui.FolderOpen,
+ symlink = lvim.icons.ui.FolderSymlink,
},
},
},
diff --git a/lua/lvim/core/telescope.lua b/lua/lvim/core/telescope.lua
index c1cfd043..6e614dd9 100644
--- a/lua/lvim/core/telescope.lua
+++ b/lua/lvim/core/telescope.lua
@@ -63,8 +63,8 @@ function M.config()
end
lvim.builtin.telescope = vim.tbl_extend("force", lvim.builtin.telescope, {
defaults = {
- prompt_prefix = "๏‘ซ ",
- selection_caret = "๏ค ",
+ prompt_prefix = lvim.icons.ui.Telescope .. " ",
+ selection_caret = lvim.icons.ui.Forward .. " ",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
diff --git a/lua/lvim/core/which-key.lua b/lua/lvim/core/which-key.lua
index 588ecce5..16c9df5e 100644
--- a/lua/lvim/core/which-key.lua
+++ b/lua/lvim/core/which-key.lua
@@ -22,9 +22,9 @@ M.config = function()
spelling = { enabled = true, suggestions = 20 }, -- use which-key for spelling hints
},
icons = {
- breadcrumb = "ยป", -- symbol used in the command line area that shows your active key combo
- separator = "โžœ", -- symbol used between a key and it's label
- group = "+", -- symbol prepended to a group
+ breadcrumb = lvim.icons.ui.DoubleChevronRight, -- symbol used in the command line area that shows your active key combo
+ separator = lvim.icons.ui.BoldArrowRight, -- symbol used between a key and it's label
+ group = lvim.icons.ui.Plus, -- symbol prepended to a group
},
popup_mappings = {
scroll_down = "<c-d>", -- binding to scroll down inside the popup