update: nvim

This commit is contained in:
wyj
2025-03-24 20:37:02 -04:00
parent ac8f51e7cf
commit cc1870ecd2
47 changed files with 880 additions and 751 deletions
@@ -5,20 +5,43 @@ return function()
misc = require("modules.utils.icons").get("misc", true),
ui = require("modules.utils.icons").get("ui", true),
}
local utils = require("dropbar.utils")
local sources = require("dropbar.sources")
-- Custom source to display only the leaf filename in the dropbar
sources.symbols = {
get_symbols = function(buf, win, cursor)
local symbols = sources.path.get_symbols(buf, win, cursor)
return { symbols[#symbols] }
end,
}
require("modules.utils").load_plugin("dropbar", {
bar = {
hover = false,
truncate = true,
pick = { pivots = "etovxqpdygfblzhckisuran" },
sources = function(buf)
if vim.bo[buf].ft == "markdown" then
return {
sources.symbols,
sources.markdown,
}
end
if vim.bo[buf].buftype == "terminal" then
return {
sources.terminal,
}
end
return {
sources.symbols,
utils.source.fallback({
sources.lsp,
sources.treesitter,
}),
}
end,
},
sources = {
path = {
relative_to = function()
-- Only show the leaf filename in dropbar
return vim.fn.expand("%:p:h")
end,
},
terminal = {
name = function(buf)
local name = vim.api.nvim_buf_get_name(buf)
@@ -35,7 +58,6 @@ return function()
icons = {
enable = true,
kinds = {
use_devicons = true,
symbols = {
-- Type
Array = icons.type.Array,