feat(editor): add barbeque

Adds vscode like winbar
This commit is contained in:
Rubin Bhandari 2024-05-13 12:29:03 +05:45 committed by GitHub
parent abb1ff0d60
commit 6b89bb3114
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,34 @@
return {
{
"utilyre/barbecue.nvim",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons",
},
opts = {
show_modified = true,
create_autocmd = false,
},
config = function(_, opts)
require("barbecue").setup(opts)
-- auto update barbecue , more performant than using default autocmd
vim.api.nvim_create_autocmd({
"WinScrolled", -- or WinResized on NVIM-v0.9 and higher
"BufWinEnter",
"CursorHold",
"InsertLeave",
-- include this if you have set `show_modified` to `true`
"BufModifiedSet",
}, {
group = vim.api.nvim_create_augroup("barbecue.updater", { clear = true }),
callback = function()
local barbeque_ui = prequire("barbecue.ui")
barbeque_ui.update()
end,
})
end,
},
}