Skip to content

Commit 351df69

Browse files
committed
added tab support
1 parent ea528c2 commit 351df69

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

init.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,33 @@ on_attach =
219219
end,
220220
})
221221

222+
-- tab keybinds
223+
local map = vim.api.nvim_set_keymap
224+
local opts = { noremap = true, silent = true }
225+
226+
-- Move to previous/next
227+
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
228+
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
229+
-- Goto buffer in position...
230+
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
231+
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
232+
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
233+
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
234+
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
235+
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
236+
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
237+
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
238+
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
239+
map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
240+
-- Sort automatically by...
241+
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts)
242+
map('n', '<Space>bn', '<Cmd>BufferOrderByName<CR>', opts)
243+
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)
244+
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', opts)
245+
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)
246+
-- Close buffer
247+
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
248+
222249
-- [[ Install `lazy.nvim` plugin manager ]]
223250
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
224251
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'

lua/custom/plugins/init.lua

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,29 @@ return {
249249

250250
-- catppuccin if i want
251251
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000 },
252+
253+
-- display whitespace in visual mode
254+
{
255+
'mcauley-penney/visual-whitespace.nvim',
256+
config = true,
257+
},
258+
259+
-- tabs
260+
{
261+
'romgrk/barbar.nvim',
262+
dependencies = {
263+
'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
264+
'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
265+
},
266+
init = function()
267+
vim.g.barbar_auto_setup = false
268+
end,
269+
opts = {
270+
-- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default:
271+
-- animation = true,
272+
-- insert_at_start = true,
273+
-- …etc.
274+
},
275+
version = '^1.0.0', -- optional: only update when a new 1.x version is released
276+
},
252277
}

0 commit comments

Comments
 (0)