1
0
Fork 0

icon rework and small refactor

This commit is contained in:
Luca Bilke 2024-01-26 17:21:37 +01:00
parent c8a407b681
commit 1a18a8ef30
17 changed files with 185 additions and 434 deletions

View File

@ -1,163 +1,80 @@
return {
Diagnostic = "󰒡",
DiagnosticError = "",
DiagnosticHint = "󰌵",
DiagnosticInfo = "󰋼",
DiagnosticWarn = "",
PackageInstalled = "",
PackagePending = "",
PackageUninstalled = "",
Selected = "",
kind = {
Array = "",
Boolean = "",
Class = "",
Color = "",
Constant = "",
Constructor = "",
Enum = "",
EnumMember = "",
Event = "",
Field = "",
File = "",
Folder = "󰉋",
Function = "",
Interface = "",
Key = "",
Keyword = "",
Method = "",
Module = "",
Namespace = "",
Null = "󰟢",
Number = "",
Object = "",
Operator = "",
Package = "",
Property = "",
Reference = "",
Snippet = "",
String = "",
Struct = "",
Text = "",
TypeParameter = "",
Unit = "",
Value = "",
Variable = "",
},
git = {
LineAdded = "",
LineModified = "",
LineRemoved = "",
FileDeleted = "",
FileIgnored = "",
FileRenamed = "",
FileStaged = "S",
FileUnmerged = "",
FileUnstaged = "",
FileUntracked = "U",
Diff = "",
Repo = "",
Octoface = "",
Branch = "",
},
ui = {
ArrowCircleDown = "",
ArrowCircleLeft = "",
ArrowCircleRight = "",
ArrowCircleUp = "",
BoldArrowDown = "",
BoldArrowLeft = "",
BoldArrowRight = "",
BoldArrowUp = "",
BoldClose = "",
BoldDividerLeft = "",
BoldDividerRight = "",
BoldLineLeft = "",
BookMark = "",
BoxChecked = "",
Bug = "",
Stacks = "",
Scopes = "",
Watches = "󰂥",
Debug = "",
Calendar = "",
Check = "",
ChevronRight = ">",
ChevronShortDown = "",
ChevronShortLeft = "",
ChevronShortRight = "",
ChevronShortUp = "",
Circle = "",
Clear = "󰃢",
Close = "󰅖",
CloudDownload = "",
CMD = "",
Code = "",
Comment = "",
Dashboard = "",
DividerLeft = "",
DividerRight = "",
DoubleChevronRight = "󰄾",
DoubleChevronLeft = "󰄽",
Ellipsis = "",
EmptyFolder = "",
EmptyFolderOpen = "",
EmptyFile = "",
File = "",
Files = "",
FileSymlink = "",
FindFile = "󰈞",
FindText = "󰊄",
Fire = "",
Folder = "󰉋",
FolderOpen = "",
FolderSymlink = "",
Forward = "",
Gear = "",
History = "",
Import = "",
Keyboard = "",
Lightbulb = "",
LineLeft = "",
LineMiddle = "",
List = "",
Lock = "",
MinusCircle = "",
Note = "",
Package = "",
Pencil = "󰏫",
Plus = "",
Project = "",
Search = "",
SignIn = "",
SignOut = "",
Sleep = "󰒲",
Save = "",
Tab = "󰓩",
Table = "",
Target = "",
Telescope = "",
Text = "",
Terminal = "",
Tree = "",
Triangle = "󰐊",
triangleshortarrowdown = "",
triangleshortarrowleft = "",
triangleshortarrowright = "",
triangleshortarrowup = "",
},
Diagnostic = "󰭷",
Error = "󰅗",
Hint = "󰌵",
Info = "󰋼",
Warn = "󰀦",
Bug = "󰠭",
True = "󰸞",
Pending = "󰁪",
False = "󱎘",
Close = "󱎘",
Selected = "󰅂",
Console = "󰆍",
Gear = "󰒓",
Event = "󱐋",
File = "󰈔",
NewFile = "󰝒",
FileTree = "󰙅",
Import = "󰈠",
Keyboard = "󰌌",
Sleep = "󰒲",
Package = "󰏗",
Runtime = "",
Source = "󰈮",
Code = "",
Start = "",
Task = "󰱒",
Buffer = "󰧭",
Search = "",
Speed = "󰾆",
Test = "",
Flame = "",
Leave = "",
Git = "󰊢",
Loaded = "󰜄",
Unloaded = "󰛲",
Added = "󰜄",
Modified = "󱗝",
Removed = "󰛲",
Untracked = "",
ChangeDelete = "󰅘",
Truncate = "",
-- kind = {
-- Array = "",
-- Boolean = "",
-- Class = "",
-- Color = "",
-- Constant = "",
-- Constructor = "",
-- Enum = "",
-- EnumMember = "",
-- Event = "",
-- Field = "",
-- File = "",
-- Folder = "󰉋",
-- Function = "",
-- Interface = "",
-- Key = "",
-- Keyword = "",
-- Method = "",
-- Module = "",
-- Namespace = "",
-- Null = "󰟢",
-- Number = "",
-- Object = "",
-- Operator = "",
-- Package = "",
-- Property = "",
-- Reference = "",
-- Snippet = "",
-- String = "",
-- Struct = "",
-- Text = "",
-- TypeParameter = "",
-- Unit = "",
-- Value = "",
-- Variable = "",
-- },
-- progress = { "", "", "", "", "", "", "", "", "", "", "", "", "" },
misc = {
Robot = "󰚩",
Squirrel = "",
Tag = "",
Watch = "",
Smiley = "",
Package = "",
CircuitBoard = "",
Vim = "",
Git = ""
},
}

View File

@ -3,14 +3,14 @@ local icons = require("config.icons")
local maps = f.empty_map_table()
local sections = {
p = { desc = " " .. icons.ui.Package .. " Packages" },
b = { desc = " " .. icons.ui.Tab .. " Buffers" },
bs = { desc = " " .. icons.ui.Tab .. " Sort Buffers" },
d = { desc = " " .. icons.ui.Debug .. " Debugger" },
g = { desc = " " .. icons.misc.Git .. " Git" },
f = { desc = " " .. icons.ui.Search .. " Find" },
l = { desc = " " .. icons.ui.Note .. " LSP" },
t = { desc = " " .. icons.ui.Terminal .. " Terminal" },
p = { desc = icons.Package .. " Packages" },
b = { desc = icons.Buffer .. " Buffers" },
bs = { desc = "Sort Buffers" },
d = { desc = icons.Bug .. " Debugger" },
g = { desc = icons.Git .. " Git" },
f = { desc = icons.Search .. " Find" },
l = { desc = icons.Code .. " LSP" },
t = { desc = icons.Console .. " Terminal" },
}
-- Standard --
@ -31,9 +31,6 @@ maps.n["<Leader>q"] = { f.buf_close, desc = "Close buffer" }
maps.n["<C-b>"] = { "<C-a>" }
maps.n["<C-f>"] = { "<Nop>" }
maps.i["<C-h>"] = { "<C-W>" }
-- TODO: Remove this when implemented in lsp_on_attach
maps.n["<Leader>lf"] = { vim.lsp.buf.format, desc = "Format" }
-- TODO: Add compiler script back (or don't tbh)
-- Window Navigation --
maps.n["<C-h>"] = { "<C-w>h", desc = "Move to left split" }
@ -50,6 +47,7 @@ maps.t["<C-k>"] = { "<cmd>wincmd k<cr>", desc = "Terminal up window navigation"
maps.t["<C-l>"] = { "<cmd>wincmd l<cr>", desc = "Terminal right window navigation" }
-- Plugin Manager --
maps.n["<Leader>p"] = sections.p
maps.n["<Leader>ph"] = { function() require("lazy").home() end, desc = "Home" }
maps.n["<Leader>pi"] = { function() require("lazy").install() end, desc = "Install" }
maps.n["<Leader>pu"] = { function() require("lazy").update() end, desc = "Update" }

View File

@ -250,7 +250,7 @@ function M.lsp_on_attach(client, bufnr)
function() vim.lsp.codelens.run() end,
desc = "Run CodeLens",
}
lsp_mappings.n["<Leader>u"] = { desc = " " .. icons.ui.Gear .. " Utility" }
lsp_mappings.n["<Leader>u"] = { desc = " " .. icons.Gear .. " Utility" }
lsp_mappings.n["<leader>uL"] = {
function() vim.lsp.codelens.clear() end,
desc = "Toggle CodeLens"
@ -309,7 +309,7 @@ function M.lsp_on_attach(client, bufnr)
-- TODO: Check this on 0.10.0 release
if client.supports_method "textDocument/semanticTokens/full" and vim.lsp.semantic_tokens then
vim.b[bufnr].semantic_tokens_enabled = true
lsp_mappings.n["<Leader>u"] = { desc = " " .. icons.ui.Gear .. " Utility" }
lsp_mappings.n["<Leader>u"] = { desc = " " .. icons.Gear .. " Utility" }
lsp_mappings.n["<leader>uY"] = {
function()
vim.b[bufnr].semantic_tokens_enabled = not vim.b[bufnr].semantic_tokens_enabled
@ -370,7 +370,7 @@ function M.lsp_on_attach(client, bufnr)
-- TODO: Check this on 0.10.0 release
if vim.lsp.inlay_hint then
if vim.b.inlay_hints_enabled then vim.lsp.inlay_hint.enable(bufnr, true) end
lsp_mappings.n["<Leader>u"] = { desc = " " .. icons.ui.Gear .. " Utility" }
lsp_mappings.n["<Leader>u"] = { desc = " " .. icons.Gear .. " Utility" }
lsp_mappings.n["<leader>uH"] = {
function()
vim.b[bufnr].inlay_hints_enabled = not vim.b[bufnr].inlay_hints_enabled
@ -423,8 +423,8 @@ function M.lsp_on_attach(client, bufnr)
end
if not vim.tbl_isempty(lsp_mappings.v) then
if lsp_mappings.v["<leader>l"] then lsp_mappings.v["<leader>l"] = { desc = " " .. icons.ui.Note .. " LSP" } end
if lsp_mappings.v["<leader>u"] then lsp_mappings.v["<leader>u"] = { desc = " " .. icons.ui.Note .. " LSP" } end
if lsp_mappings.v["<leader>l"] then lsp_mappings.v["<leader>l"] = { desc = " " .. icons.Code .. " LSP" } end
if lsp_mappings.v["<leader>u"] then lsp_mappings.v["<leader>u"] = { desc = " " .. icons.Code .. " LSP" } end
end
M.set_mappings(lsp_mappings, { buffer = bufnr })

View File

@ -1,122 +0,0 @@
local M = { "hrsh7th/nvim-cmp" }
M.dependencies = {
{ "onsails/lspkind.nvim" },
{ "saadparwaiz1/cmp_luasnip" },
{ "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/cmp-buffer" },
{ "hrsh7th/cmp-path" },
"LuaSnip",
"nvim-autopairs",
}
M.event = { "BufReadPost", "BufNewFile" }
local opts = function()
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local cmp_window = require('cmp.utils.window')
cmp_window.info_ = cmp_window.info
cmp_window.info = function(self)
local info = self:info_()
info.scrollable = false
return info
end
local luasnip = require('luasnip')
local cmp = require('cmp')
return {
window = {
completion = {
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
col_offset = -3,
side_padding = 0,
},
},
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, vim_item)
local strings = vim.split(kind.kind, "%s", { trimempty = true })
kind.kind = " " .. (strings[1] or "") .. " "
kind.menu = " (" .. (strings[2] or "") .. ")"
return kind
end,
},
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = {
["<C-j>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
["<C-k>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
["<CR>"] = cmp.mapping({
i = function(fallback)
if cmp.visible() and cmp.get_active_entry() then
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
else
fallback()
end
end,
s = cmp.mapping.confirm({ select = true }),
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
}),
["<C-e>"] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
}),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
},
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
},
experimental = {
ghost_text = true,
},
confirm_opts = {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
}
}
end
M.config = function()
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
local cmp = require('cmp')
cmp.setup(opts())
cmp.event:on(
'confirm_done',
cmp_autopairs.on_confirm_done()
)
end
return M

View File

@ -1,4 +0,0 @@
return {
-- require('plugins.cmp.luasnip'),
-- require('plugins.cmp.cmp'),
}

View File

@ -1,47 +0,0 @@
local M = { "L3MON4D3/LuaSnip" }
M.build = "make install_jsregexp"
local opts = function()
local luasnip = require('luasnip')
local f = luasnip.function_node
return {
history = true,
enable_autosnippets = true,
update_events = { "TextChanged", "TextChangedI" },
snip_env = {
s = function(...)
local snip = luasnip.s(...)
table.insert(getfenv(2).ls_file_snippets, snip)
end,
parse = function(...)
local snip = luasnip.parser.parse_snippet(...)
table.insert(getfenv(2).ls_file_snippets, snip)
end,
reference = function(node)
return f(function(args, _) return args[1][1] end, node)
end,
capture = function(index)
return f(function(_, snip, user_arg1) return snip.captures[user_arg1] end, nil, { user_args = { index } })
end
},
}
end
M.config = function()
require('luasnip').setup(opts())
require('luasnip.loaders.from_lua').load({ paths = os.getenv("XDG_CONFIG_HOME") .. "/nvim/lua/snippets" })
--require('luasnip.loaders.from_vscode').load({ paths = os.getenv("XDG_CONFIG_HOME") .. "/nvim/lua/snippets" })
vim.api.nvim_create_autocmd("InsertLeave", {
callback = function()
local luasnip = require('luasnip')
if luasnip.session.current_nodes[vim.api.nvim_get_current_buf()]
and not luasnip.session.jump_active
then
luasnip.unlink_current()
end
end,
})
end
return M

View File

@ -13,7 +13,7 @@ M.config = function()
vim.fn.sign_define(
"DapBreakpoint",
{
text = icons.ui.Bug,
text = icons.Bug,
texthl = "DiagnosticSignError",
linehl = "",
numhl = "",

View File

@ -1,32 +1,25 @@
local M = { "folke/lazy.nvim" }
local icons = require('config.icons')
M.opts = {
ui = {
border = "single",
icons = {
cmd = icons.ui.CMD .. " ",
config = icons.ui.Gear,
event = icons.misc.Bolt,
ft = icons.ui.File .. " ",
init = icons.ui.Gear .. " ",
import = icons.ui.Import .. " ",
keys = icons.ui.Keyboard .. " ",
lazy = icons.ui.Sleep .. " ",
loaded = icons.ui.CircleFull,
not_loaded = icons.ui.CircleEmpty,
plugin = icons.misc.Package,
runtime = icons.misc.Vim .. " ",
source = icons.ui.Code .. " ",
start = icons.ui.Start,
task = icons.ui.Check .. " ",
list = {
icons.ui.CircleFull,
icons.ui.BoldArrowRight,
icons.misc.Star,
icons.ui.LineHorizontal,
},
cmd = icons.Console .. " ",
config = icons.Gear,
event = icons.Event,
ft = icons.File .. " ",
init = icons.Gear .. " ",
import = icons.Import .. " ",
keys = icons.Keyboard .. " ",
lazy = icons.Sleep .. " ",
loaded = icons.Loaded,
not_loaded = icons.Unloaded,
plugin = icons.Package,
runtime = icons.Runtime .. " ",
source = icons.Source .. " ",
start = icons.Start,
task = icons.Task,
},
},
}

View File

@ -28,10 +28,10 @@ M.cmd = { "LspInstall", "LspUninstall" }
M.config = function()
local icons = require("config.icons")
local signs = {
{ name = "DiagnosticSignError", text = icons.DiagnosticError, texthl = "DiagnosticSignError" },
{ name = "DiagnosticSignWarn", text = icons.DiagnosticWarn, texthl = "DiagnosticSignWarn" },
{ name = "DiagnosticSignHint", text = icons.DiagnosticHint, texthl = "DiagnosticSignHint" },
{ name = "DiagnosticSignInfo", text = icons.DiagnosticInfo, texthl = "DiagnosticSignInfo" },
{ name = "DiagnosticSignError", text = icons.Error, texthl = "DiagnosticSignError" },
{ name = "DiagnosticSignWarn", text = icons.Warn, texthl = "DiagnosticSignWarn" },
{ name = "DiagnosticSignHint", text = icons.Hint, texthl = "DiagnosticSignHint" },
{ name = "DiagnosticSignInfo", text = icons.Info, texthl = "DiagnosticSignInfo" },
{ name = "DapStopped", text = icons.DapStopped, texthl = "DiagnosticWarn" },
{ name = "DapBreakpoint", text = icons.DapBreakpoint, texthl = "DiagnosticInfo" },
{ name = "DapBreakpointRejected", text = icons.DapBreakpointRejected, texthl = "DiagnosticError" },
@ -46,10 +46,10 @@ M.config = function()
virtual_text = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = icons.DiagnosticError,
[vim.diagnostic.severity.HINT] = icons.DiagnosticHint,
[vim.diagnostic.severity.WARN] = icons.DiagnosticWarn,
[vim.diagnostic.severity.INFO] = icons.DiagnosticInfo,
[vim.diagnostic.severity.ERROR] = icons.Error,
[vim.diagnostic.severity.HINT] = icons.Hint,
[vim.diagnostic.severity.WARN] = icons.Warn,
[vim.diagnostic.severity.INFO] = icons.Info,
},
active = signs,
},

View File

@ -17,9 +17,9 @@ M.opts = {
ui = {
border = "none",
icons = {
package_installed = icons.PackageInstalled,
package_pending = icons.PackagePending,
package_uninstalled = icons.PackageUninstalled,
package_installed = icons.True,
package_pending = icons.Pending,
package_uninstalled = icons.False,
},
},
log_level = vim.log.levels.INFO,

View File

@ -1,8 +1,11 @@
local M = { "goolord/alpha-nvim" }
local icons = require('config.icons')
M.opts = function()
local dashboard = require('alpha.themes.dashboard')
local icons = require("config.icons")
local dashboard = require("alpha.themes.dashboard")
dashboard.section.header.opts.hl = "DashboardHeader"
dashboard.section.footer.opts.hl = "DashboardFooter"
local banner = {
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣿⣿⣿⣷⣶⣤⡀⠀⠀⠀⠀⠀⠀",
@ -36,19 +39,42 @@ M.opts = function()
dashboard.section.header.val = banner
dashboard.section.buttons.val = {
dashboard.button("n", icons.ui.EmptyFile .. " New file", "<CMD>ene<CR>"),
dashboard.button("e", icons.ui.FindFile .. " Open file", "<CMD>Lf<CR>"),
dashboard.button("q", icons.ui.SignOut .. " Quit", "<CMD>qa<CR>"),
dashboard.button("n", icons.File .. " New file", "<Cmd>ene<CR>"),
dashboard.button("f", icons.Search .. " Find file", "<Cmd>:lua require('telescope.builtin').find_files()<CR>"),
dashboard.button("e", icons.FileTree .. " Browse files", "<Cmd>Lf<CR>"),
dashboard.button("q", icons.Leave .. " Quit", "<Cmd>qa<CR>"),
}
dashboard.section.footer.val = "Behold: a Snail's Vim"
dashboard.section.footer.opts.hl = "Type"
dashboard.section.header.opts.hl = "Include"
dashboard.section.buttons.opts.hl = "Keyword"
dashboard.config.layout = {
{ type = "padding", val = vim.fn.max { 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) } },
dashboard.section.header,
{ type = "padding", val = 5 },
dashboard.section.buttons,
{ type = "padding", val = 3 },
dashboard.section.footer,
}
-- dashboard.opts.opts.noautocmd = true
return dashboard.opts
dashboard.config.opts.noautocmd = true
return dashboard
end
M.config = function(_, opts)
require("alpha").setup(opts.config)
vim.api.nvim_create_autocmd("User", {
pattern = "LazyVimStarted",
desc = "Add Alpha dashboard footer",
once = true,
callback = function()
local stats = require("lazy").stats()
local ms = math.floor(stats.startuptime * 100 + 0.5) / 100
opts.section.footer.val = { stats.count .. "" .. ms .. "ms" }
pcall(vim.cmd.AlphaRedraw)
end,
})
end
return M

View File

@ -8,9 +8,9 @@ M.opts = function()
local function diagnostics_indicator(_, _, diagnostics, _)
local result = {}
local symbols = {
error = icons.DiagnosticError,
warning = icons.DiagnosticWarning,
info = icons.DiagnosticInformation,
error = icons.Error,
warning = icons.Warn,
info = icons.Info,
}
for name, count in pairs(diagnostics) do
if symbols[name] and count > 0 then
@ -36,11 +36,11 @@ M.opts = function()
indicator = {
style = "none",
},
buffer_close_icon = icons.ui.Close,
modified_icon = icons.ui.Circle,
close_icon = icons.ui.BoldClose,
left_trunc_marker = icons.ui.ArrowCircleLeft,
right_trunc_marker = icons.ui.ArrowCircleRight,
buffer_close_icon = icons.Close,
modified_icon = icons.Modified,
close_icon = icons.Close,
left_trunc_marker = icons.Truncate,
right_trunc_marker = icons.Truncate,
diagnostics = "nvim_lsp",
diagnostics_indicator = diagnostics_indicator,
offsets = {},

View File

@ -6,12 +6,12 @@ local icons = require('config.icons')
M.opts = {
signs = {
add = { text = icons.git.LineAdded },
change = { text = icons.git.LineModified },
delete = { text = icons.git.LineRemoved },
topdelete = { text = icons.git.LineRemoved },
changedelete = { text = icons.git.FileRenamed },
untracked = { text = icons.git.FileIgnored },
add = { text = icons.Added },
change = { text = icons.Modified },
delete = { text = icons.Removed },
topdelete = { text = icons.Removed },
changedelete = { text = icons.ChangeDelete },
untracked = { text = icons.Untracked },
},
}

View File

@ -4,24 +4,6 @@ M.main = "ibl"
M.event = { "BufReadPost", "BufNewFile" }
-- FIX: This keybind is broken and should be moved to config/keymaps.lua
-- M.keys = {
-- {
-- "<c-c>",
-- function()
-- local ok, start = require("indent_blankline.utils").get_current_context(
-- vim.g.indent_blankline_context_patterns,
-- vim.g.indent_blankline_use_treesitter_scope
-- )
-- if ok then
-- vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 })
-- vim.cmd [[normal! _]]
-- end
-- end,
-- desc = "Jump to context",
-- },
-- }
M.dependencies = {
"nvim-treesitter",
}

View File

@ -179,9 +179,9 @@ M.opts = function()
'diagnostics',
sources = { 'nvim_diagnostic' },
symbols = {
error = icons.DiagnosticError .. ' ',
warn = icons.DiagnosticWarn .. ' ',
info = icons.DiagnosticInfo .. ' ',
error = icons.Error .. ' ',
warn = icons.Warn .. ' ',
info = icons.Info .. ' ',
},
diagnostics_color = {
color_error = { fg = colors.red },

View File

@ -1,11 +1,19 @@
local M = { "folke/todo-comments.nvim" }
local icons = require('config.icons')
M.event = { "BufReadPost", "BufNewFile" }
M.config = {
highlight = {
multiline = false
}
signs = false,
keywords = {
BUG = { icon = icons.Bug, color = "error", alt = { "FIXME", "FIX", "FIXIT", "ISSUE" } },
TODO = { icon = icons.Task, color = "info" },
HACK = { icon = icons.Flame, color = "warning" },
WARN = { icon = icons.Warn, color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = icons.Speed, alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = icons.Buffer, color = "hint", alt = { "INFO" } },
TEST = { icon = icons.Test, color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
},
}
return M

View File

@ -17,9 +17,9 @@ M.opts = {
}
},
icons = {
breadcrumb = icons.ui.DoubleChevronRight,
separator = icons.ui.BoldArrowRight,
group = icons.ui.Plus,
breadcrumb = icons.Selected,
separator = icons.Selected,
group = icons.Buffer .. "",
},
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ " },
triggers = "auto",