plugins/theme: remove barbar config

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-26 15:21:07 +03:00
parent d6a70d64ea
commit 426456baa7
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -1,38 +0,0 @@
-- See: https://github.com/romgrk/barbar.nvim
require("bufferline").setup({
auto_hide = false,
closable = false,
clickable = false,
icons = false, -- TODO: add icons (required nvim-web-devicons)
})
-------------------------------------------------------------------------------
-- Keybindings
local opts = { silent = true }
vim.keymap.set("n", "gB", "<Cmd>BufferPrevious<CR>", opts)
vim.keymap.set("n", "gb", "<Cmd>BufferNext<CR>", opts)
vim.keymap.set("n", "gQ", "<Cmd>BufferClose<CR>", opts)
-------------------------------------------------------------------------------
-- Integration with nvim-tree
local nvim_tree_events = require("nvim-tree.events")
local bufferline_state = require("bufferline.state")
local function get_tree_size()
return require("nvim-tree.view").View.width
end
nvim_tree_events.subscribe("TreeOpen", function()
bufferline_state.set_offset(get_tree_size())
end)
nvim_tree_events.subscribe("Resize", function()
bufferline_state.set_offset(get_tree_size())
end)
nvim_tree_events.subscribe("TreeClose", function()
bufferline_state.set_offset(0)
end)