[nvim] Update the barbar config

This commit is contained in:
Alyxia Sother 2023-05-10 11:17:35 +02:00
parent cdccc1f0d3
commit 56849789a0
No known key found for this signature in database
GPG Key ID: 01E16C4E775A37E4
2 changed files with 20 additions and 9 deletions

20
nvim/plugin/barbar.lua Normal file
View File

@ -0,0 +1,20 @@
local ok, barbar = pcall(require, 'barbar')
if not ok then return end;
barbar.setup {
icons = {
buffer_index = true,
filetype = {
enabled = true
}
}
}
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
-- Navigating buffers
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
map('n', '<A-s>', '<Cmd>BufferPick<CR>', opts)
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)

View File

@ -1,9 +0,0 @@
let bufferline = get(g:, 'bufferline', {})
let bufferline.icons = 'both'
" Navigating buffers
nnoremap <silent> <A-,> :BufferPrevious<CR>
nnoremap <silent> <A-.> :BufferNext<CR>
nnoremap <silent> <A-s> :BufferPick<CR>
nnoremap <silent> <A-c> :BufferClose<CR>