mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(editor): add barbeque
Adds vscode like winbar
This commit is contained in:
parent
abb1ff0d60
commit
6b89bb3114
1 changed files with 34 additions and 0 deletions
34
lua/lazyvim/plugins/extras/editor/barbeque.lua
Normal file
34
lua/lazyvim/plugins/extras/editor/barbeque.lua
Normal 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,
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue