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")
|
vim.api.nvim_create_autocmd({ 'BufReadPost', 'BufNewFile', 'BufWritePost' }, {
|
||||||
|
once = true,
|
||||||
local function get_hl_color(group, attr)
|
group = vim.api.nvim_create_augroup('DropBarSetup', {}),
|
||||||
return vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID(group)), attr)
|
callback = function()
|
||||||
|
if vim.g.loaded_dropbar then
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
require('dropbar').setup()
|
||||||
vim.cmd [[hi WinBar guisp=#665c54 guibg=#313131]]
|
end,
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in New Issue