nixos/config/nvim/lua/plugins/barbar.lua

20 lines
707 B
Lua
Raw Normal View History

return {
"romgrk/barbar.nvim",
dependencies = "nvim-tree/nvim-web-devicons",
event = { "BufReadPre", "BufNewFile" },
config = function()
require("bufferline").setup(require "config.barbar")
vim.api.nvim_create_autocmd("BufWinEnter", {
callback = function(tbl)
if vim.bo[tbl.buf].filetype == "neo-tree" then require("bufferline.api").set_offset(41, "FileTree") end
end,
})
vim.api.nvim_create_autocmd({ "BufWinLeave", "BufWipeout" }, {
callback = function(tbl)
if vim.bo[tbl.buf].filetype == "neo-tree" then require("bufferline.api").set_offset(0) end
end,
})
end,
}