From 5a0d327ceec0a5eaf7f79085f2797e085d1a7857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20P?= Date: Tue, 21 Jan 2025 08:10:26 +0100 Subject: [PATCH] Revert "refactor: replace barbecue with bufferline (#430)" (#433) This reverts commit 98e4a7b2f1d9d214e4cb8202bcfcc5c77ae41f9e. --- lazy-lock.json | 6 +++--- lua/plugins/barbecue.lua | 33 +++++++++++++++++++++++++++++++ lua/plugins/bufferline.lua | 40 -------------------------------------- lua/plugins/catpuccin.lua | 6 +++--- 4 files changed, 39 insertions(+), 46 deletions(-) create mode 100644 lua/plugins/barbecue.lua delete mode 100644 lua/plugins/bufferline.lua diff --git a/lazy-lock.json b/lazy-lock.json index 559240b..5b22f9d 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,7 +1,7 @@ { + "barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" }, "before.nvim": { "branch": "master", "commit": "187bafe2792a82d53cdb632971e4113cd703ac53" }, "bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" }, - "bufferline.nvim": { "branch": "main", "commit": "17083c826a004bcb87d3a830c7710d0796a73bbf" }, "catppuccin": { "branch": "main", "commit": "f67b886d65a029f12ffa298701fb8f1efd89295d" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, @@ -49,12 +49,12 @@ "rainbow-delimiters.nvim": { "branch": "master", "commit": "85b80abaa09cbbc039e3095b2f515b3cf8cadd11" }, "rustaceanvim": { "branch": "master", "commit": "bc8c4b8f7606d5b7c067cd8369e25c1a7ff77bd0" }, "schemastore.nvim": { "branch": "main", "commit": "feaa60d3451d7f7e52eaf76a07ea52808d68cf6c" }, - "snacks.nvim": { "branch": "main", "commit": "1b7a57a0b14b37a708330a346a767865954ce448" }, + "snacks.nvim": { "branch": "main", "commit": "d2b2b7bcbf9814d61f2e8049affed750509f44e3" }, "telescope-git-submodules.nvim": { "branch": "main", "commit": "e9bbf8b9451dcd7911e0c1bf3ab0f61bb33e0a59" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, - "trouble.nvim": { "branch": "main", "commit": "4d36b8979287f5facc03fd6d955ace67db667e1d" }, + "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, "typescript-tools.nvim": { "branch": "master", "commit": "35e397ce467bedbbbb5bfcd0aa79727b59a08d4a" }, "undotree": { "branch": "master", "commit": "2556c6800b210b2096b55b66e74b4cc1d9ebbe4f" }, "vim-dadbod": { "branch": "master", "commit": "f740950d0703099e0f172016f10e0e39f50fd0ba" }, diff --git a/lua/plugins/barbecue.lua b/lua/plugins/barbecue.lua new file mode 100644 index 0000000..6bf0a44 --- /dev/null +++ b/lua/plugins/barbecue.lua @@ -0,0 +1,33 @@ +return { + 'utilyre/barbecue.nvim', + name = 'barbecue', + event = { 'BufEnter' }, + version = '*', + dependencies = { + 'SmiteshP/nvim-navic', + 'nvim-tree/nvim-web-devicons', + }, + config = function() + require('barbecue').setup({ + attach_navic = true, + show_dirname = false, + theme = 'catpuccin-mocha', + create_autocmd = false, + }) + + vim.api.nvim_create_autocmd({ + 'WinResized', + 'BufWinEnter', + 'CursorHold', + 'InsertLeave', + + -- include this if you have set `show_modified` to `true` + 'BufModifiedSet', + }, { + group = vim.api.nvim_create_augroup('barbecue.updater', {}), + callback = function() + require('barbecue.ui').update() + end, + }) + end, +} diff --git a/lua/plugins/bufferline.lua b/lua/plugins/bufferline.lua deleted file mode 100644 index 93860e4..0000000 --- a/lua/plugins/bufferline.lua +++ /dev/null @@ -1,40 +0,0 @@ -return { - 'akinsho/bufferline.nvim', - event = 'VeryLazy', - keys = { - { 'bp', 'BufferLineTogglePin', desc = 'Toggle Pin' }, - { 'bP', 'BufferLineGroupClose ungrouped', desc = 'Delete Non-Pinned Buffers' }, - { 'br', 'BufferLineCloseRight', desc = 'Delete Buffers to the Right' }, - { 'bl', 'BufferLineCloseLeft', desc = 'Delete Buffers to the Left' }, - { '[b', 'BufferLineCyclePrev', desc = 'Prev Buffer' }, - { ']b', 'BufferLineCycleNext', desc = 'Next Buffer' }, - { '[B', 'BufferLineMovePrev', desc = 'Move buffer prev' }, - { ']B', 'BufferLineMoveNext', desc = 'Move buffer next' }, - }, - opts = { - options = { - diagnostics = 'nvim_lsp', - always_show_bufferline = false, - offsets = { - { - filetype = 'neo-tree', - text = 'Neo-tree', - highlight = 'Directory', - text_align = 'left', - }, - }, - color_icons = true, - }, - }, - config = function(_, opts) - require('bufferline').setup(opts) - -- Fix bufferline when restoring a session - vim.api.nvim_create_autocmd({ 'BufAdd', 'BufDelete' }, { - callback = function() - vim.schedule(function() - pcall(nvim_bufferline) - end) - end, - }) - end, -} diff --git a/lua/plugins/catpuccin.lua b/lua/plugins/catpuccin.lua index 6ef33b9..6d73a26 100644 --- a/lua/plugins/catpuccin.lua +++ b/lua/plugins/catpuccin.lua @@ -26,9 +26,9 @@ return { functions = { 'italic' }, }, integrations = { - -- barbecue = { - -- dim_dirname = true, - -- }, + barbecue = { + dim_dirname = true, + }, cmp = true, coc_nvim = false, diffview = true,