feat(dropbar): add default config (needed to fix)
This commit is contained in:
parent
dfd0917f9a
commit
ec99f601a0
|
@ -1,30 +1,10 @@
|
|||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
vim.api.nvim_create_autocmd({ 'BufReadPost', 'BufNewFile', 'BufWritePost' }, {
|
||||
once = true,
|
||||
group = vim.api.nvim_create_augroup('DropBarSetup', {}),
|
||||
callback = function()
|
||||
if vim.g.loaded_dropbar then
|
||||
return
|
||||
end
|
||||
require('dropbar').setup()
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue