210 current 2025-01-11 04:41:26 25.05.20241217.d3c42f1 6.6.66 *

This commit is contained in:
2025-01-11 04:41:35 -05:00
parent f4dd93bd94
commit 7978aa21c9
4 changed files with 80 additions and 84 deletions

Binary file not shown.

View File

@@ -52,10 +52,10 @@
# plugin = vim-airline;
# config = toLuaFile ./plugins/airline.lua;
# }
# {
# plugin = barbar-nvim;
# config = toLuaFile ./plugins/bufferline.lua;
# }
{
plugin = barbar-nvim;
config = toLuaFile ./plugins/barbar.lua;
}
];
# extraConfig = lib.fileContents ./init.vim;

View File

@@ -0,0 +1,76 @@
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
-- Move to previous/next
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
-- Re-order to previous/next
map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', opts)
map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', opts)
-- Goto buffer in position...
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
-- Pin/unpin buffer
map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
-- Goto pinned/unpinned buffer
-- :BufferGotoPinned
-- :BufferGotoUnpinned
-- Close buffer
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
-- Wipeout buffer
-- :BufferWipeout
-- Close commands
-- :BufferCloseAllButCurrent
-- :BufferCloseAllButPinned
-- :BufferCloseAllButCurrentOrPinned
-- :BufferCloseBuffersLeft
-- :BufferCloseBuffersRight
-- Magic buffer-picking mode
map('n', '<C-p>', '<Cmd>BufferPick<CR>', opts)
map('n', '<C-s-p>', '<Cmd>BufferPickDelete<CR>', opts)
-- Sort automatically by...
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts)
map('n', '<Space>bn', '<Cmd>BufferOrderByName<CR>', opts)
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', opts)
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)
-- Other:
-- :BarbarEnable - enables barbar (enabled by default)
-- :BarbarDisable - very bad command, should never be used
vim.g.barbar_auto_setup = false -- disable auto-setup
require'barbar'.setup {
-- Enable/disable animations
animation = true,
-- Automatically hide the tabline when there are this many buffers left.
-- Set to any value >=0 to enable.
auto_hide = false,
-- Enable/disable current/total tabpages indicator (top right corner)
tabpages = true,
-- Enables/disable clickable tabs
-- - left-click: go to buffer
-- - middle-click: delete buffer
clickable = true,
}

View File

@@ -1,80 +0,0 @@
-- Ensure bufferline configuration exists
local bufferline = vim.g.bufferline or {}
-- Enable/disable animations
bufferline.animation = true
-- Enable/disable auto-hiding the tab bar when there is a single buffer
-- bufferline.auto_hide = false
-- Enable/disable current/total tabpages indicator (top right corner)
bufferline.tabpages = true
-- Enable/disable close button
bufferline.closable = true
-- Enable/disable clickable tabs
-- - left-click: go to buffer
-- - middle-click: delete buffer
bufferline.clickable = true
-- Exclude buffers from the tabline
-- bufferline.exclude_ft = { 'javascript' }
-- bufferline.exclude_name = { 'package.json' }
-- Enable/disable icons
-- Options: 'buffer_number', 'numbers', 'both', 'buffer_number_with_icon'
bufferline.icons = true
-- Use nvim-web-devicons colors if false
bufferline.icon_custom_colors = false
-- Configure icons on the bufferline
bufferline.icon_separator_active = ''
bufferline.icon_separator_inactive = ''
bufferline.icon_close_tab = ''
bufferline.icon_close_tab_modified = ''
bufferline.icon_pinned = ''
-- Configure buffer insertion position
bufferline.insert_at_start = false
bufferline.insert_at_end = false
-- Set maximum padding width
bufferline.maximum_padding = 4
-- Set maximum buffer name length
bufferline.maximum_length = 30
-- Enable semantic letters for buffer-pick mode
bufferline.semantic_letters = true
-- Define buffer letters order for buffer-pick mode
bufferline.letters = 'asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP'
-- Set name for unnamed buffers
bufferline.no_name_title = nil
-- Mappings
vim.keymap.set('n', '<A-,>', '<Cmd>BufferPrevious<CR>', { silent = true })
vim.keymap.set('n', '<A-.>', '<Cmd>BufferNext<CR>', { silent = true })
vim.keymap.set('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', { silent = true })
vim.keymap.set('n', '<A->>', '<Cmd>BufferMoveNext<CR>', { silent = true })
vim.keymap.set('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', { silent = true })
vim.keymap.set('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', { silent = true })
vim.keymap.set('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', { silent = true })
vim.keymap.set('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', { silent = true })
vim.keymap.set('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', { silent = true })
vim.keymap.set('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', { silent = true })
vim.keymap.set('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', { silent = true })
vim.keymap.set('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', { silent = true })
vim.keymap.set('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', { silent = true })
vim.keymap.set('n', '<A-0>', '<Cmd>BufferLast<CR>', { silent = true })
vim.keymap.set('n', '<A-p>', '<Cmd>BufferPin<CR>', { silent = true })
vim.keymap.set('n', '<A-c>', '<Cmd>BufferClose<CR>', { silent = true })
vim.keymap.set('n', '<C-p>', '<Cmd>BufferPick<CR>', { silent = true })
vim.keymap.set('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', { silent = true })
vim.keymap.set('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', { silent = true })
vim.keymap.set('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', { silent = true })
vim.keymap.set('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', { silent = true })