added tab support
This commit is contained in:
		
							parent
							
								
									ea528c2dd2
								
							
						
					
					
						commit
						351df69bde
					
				
							
								
								
									
										27
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										27
									
								
								init.lua
								
								
								
								
							| 
						 | 
				
			
			@ -219,6 +219,33 @@ on_attach =
 | 
			
		|||
    end,
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
-- tab keybinds
 | 
			
		||||
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)
 | 
			
		||||
-- 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)
 | 
			
		||||
-- 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)
 | 
			
		||||
-- Close buffer
 | 
			
		||||
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
 | 
			
		||||
 | 
			
		||||
-- [[ Install `lazy.nvim` plugin manager ]]
 | 
			
		||||
--    See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
 | 
			
		||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -249,4 +249,29 @@ return {
 | 
			
		|||
 | 
			
		||||
  -- catppuccin if i want
 | 
			
		||||
  { 'catppuccin/nvim', name = 'catppuccin', priority = 1000 },
 | 
			
		||||
 | 
			
		||||
  -- display whitespace in visual mode
 | 
			
		||||
  {
 | 
			
		||||
    'mcauley-penney/visual-whitespace.nvim',
 | 
			
		||||
    config = true,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- tabs
 | 
			
		||||
  {
 | 
			
		||||
    '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 = {
 | 
			
		||||
      -- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default:
 | 
			
		||||
      -- animation = true,
 | 
			
		||||
      -- insert_at_start = true,
 | 
			
		||||
      -- …etc.
 | 
			
		||||
    },
 | 
			
		||||
    version = '^1.0.0', -- optional: only update when a new 1.x version is released
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue