From 6b89bb3114953d64a862902cfed06ca02a755a9d Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Mon, 13 May 2024 12:29:03 +0545 Subject: [PATCH] feat(editor): add barbeque Adds vscode like winbar --- .../plugins/extras/editor/barbeque.lua | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/editor/barbeque.lua diff --git a/lua/lazyvim/plugins/extras/editor/barbeque.lua b/lua/lazyvim/plugins/extras/editor/barbeque.lua new file mode 100644 index 00000000..ef6c1e10 --- /dev/null +++ b/lua/lazyvim/plugins/extras/editor/barbeque.lua @@ -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, + }, +}