31 lines
731 B
Lua
31 lines
731 B
Lua
local sources = require("dropbar.sources")
|
|
|
|
local function get_hl_color(group, attr)
|
|
return vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID(group)), attr)
|
|
end
|
|
|
|
vim.cmd [[hi WinBar guisp=#665c54 guibg=#313131]]
|
|
vim.cmd [[hi WinBarNC guisp=#665c54 guibg=#313131]]
|
|
|
|
require("dropbar").setup(
|
|
{
|
|
bar = {
|
|
sources = {
|
|
{
|
|
get_symbols = function(buf, win, cursor)
|
|
local symbols = sources.path.get_symbols(buf, win, cursor)
|
|
for _, symbol in ipairs(symbols) do
|
|
local icon_fg = get_hl_color(symbol.icon_hl, "fg#")
|
|
|
|
local icon_string = ""
|
|
|
|
vim.cmd(icon_string)
|
|
end
|
|
return symbols
|
|
end
|
|
}
|
|
}
|
|
}
|
|
}
|
|
)
|