From 56849789a007912d0bca854cbc5d19867089ef5c Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Wed, 10 May 2023 11:17:35 +0200 Subject: [PATCH] [nvim] Update the barbar config --- nvim/plugin/barbar.lua | 20 ++++++++++++++++++++ nvim/plugin/barbar.vim | 9 --------- 2 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 nvim/plugin/barbar.lua delete mode 100644 nvim/plugin/barbar.vim diff --git a/nvim/plugin/barbar.lua b/nvim/plugin/barbar.lua new file mode 100644 index 0000000..cbaa758 --- /dev/null +++ b/nvim/plugin/barbar.lua @@ -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', '', 'BufferPrevious', opts) +map('n', '', 'BufferNext', opts) +map('n', '', 'BufferPick', opts) +map('n', '', 'BufferClose', opts) diff --git a/nvim/plugin/barbar.vim b/nvim/plugin/barbar.vim deleted file mode 100644 index e3e632b..0000000 --- a/nvim/plugin/barbar.vim +++ /dev/null @@ -1,9 +0,0 @@ -let bufferline = get(g:, 'bufferline', {}) -let bufferline.icons = 'both' - -" Navigating buffers -nnoremap :BufferPrevious -nnoremap :BufferNext -nnoremap :BufferPick - -nnoremap :BufferClose