mirror of
https://github.com/mqttr/dotfiles.git
synced 2025-12-15 04:25:50 -06:00
40 lines
1.3 KiB
Lua
40 lines
1.3 KiB
Lua
local map = vim.api.nvim_set_keymap
|
|
local opts = { noremap = true, silent = true }
|
|
|
|
-- Move to previous/next
|
|
map('n', 'H', '<Cmd>BufferPrevious<CR>', opts)
|
|
map('n', 'L', '<Cmd>BufferNext<CR>', opts)
|
|
map('n', 'Q', '<cmd>BufferClose<CR>', opts)
|
|
map('n', 'T', '<cmd>BufferRestore<CR>', opts)
|
|
|
|
return {
|
|
'romgrk/barbar.nvim',
|
|
dependencies = {
|
|
'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
|
|
'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
|
|
},
|
|
init = function() vim.g.barbar_auto_setup = false end,
|
|
opts = {
|
|
sidebar_filetypes = {
|
|
-- Use the default values: {event = 'BufWinLeave', text = '', align = 'left'}
|
|
NvimTree = true,
|
|
-- Or, specify the text used for the offset:
|
|
undotree = {
|
|
text = 'undotree',
|
|
align = 'center', -- *optionally* specify an alignment (either 'left', 'center', or 'right')
|
|
},
|
|
-- Or, specify the event which the sidebar executes when leaving:
|
|
['neo-tree'] = {event = 'BufWipeout'},
|
|
-- Or, specify all three
|
|
Outline = {event = 'BufWinLeave', text = 'symbols-outline', align = 'right'},
|
|
},
|
|
keys = {
|
|
{ 'L', '<cmd>BufferNext<CR>' },
|
|
{ 'H', '<cmd>BufferPrevious<CR>' },
|
|
{ 'Q', '<cmd>BufferClose<CR>' },
|
|
{ 'T', '<cmd>BufferRestore<CR>' }
|
|
}
|
|
},
|
|
version = '^1.0.0'
|
|
}
|