mirror of
				https://github.com/WarrenHood/dotfiles.git
				synced 2025-11-04 01:38:41 +00:00 
			
		
		
		
	Update neovim config
This commit is contained in:
		
							parent
							
								
									a18cee6715
								
							
						
					
					
						commit
						5d4b1f6dcc
					
				| 
						 | 
				
			
			@ -101,50 +101,50 @@ if vim.g.neovide then
 | 
			
		|||
end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-- barbar
 | 
			
		||||
local barbar_opts = { noremap = true, silent = true }
 | 
			
		||||
 | 
			
		||||
-- Move to previous/next
 | 
			
		||||
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', barbar_opts)
 | 
			
		||||
map('n', '<A-.>', '<Cmd>BufferNext<CR>', barbar_opts)
 | 
			
		||||
-- Re-order to previous/next
 | 
			
		||||
map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', barbar_opts)
 | 
			
		||||
map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', barbar_opts)
 | 
			
		||||
-- Goto buffer in position...
 | 
			
		||||
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', barbar_opts)
 | 
			
		||||
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', barbar_opts)
 | 
			
		||||
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', barbar_opts)
 | 
			
		||||
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', barbar_opts)
 | 
			
		||||
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', barbar_opts)
 | 
			
		||||
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', barbar_opts)
 | 
			
		||||
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', barbar_opts)
 | 
			
		||||
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', barbar_opts)
 | 
			
		||||
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', barbar_opts)
 | 
			
		||||
map('n', '<A-0>', '<Cmd>BufferLast<CR>', barbar_opts)
 | 
			
		||||
-- Pin/unpin buffer
 | 
			
		||||
map('n', '<A-p>', '<Cmd>BufferPin<CR>', barbar_opts)
 | 
			
		||||
-- Close buffer
 | 
			
		||||
map('n', '<A-c>', '<Cmd>BufferClose<CR>', barbar_opts)
 | 
			
		||||
-- Wipeout buffer
 | 
			
		||||
--                 :BufferWipeout
 | 
			
		||||
 | 
			
		||||
-- Close commands
 | 
			
		||||
--                 :BufferCloseAllButCurrent
 | 
			
		||||
--                 :BufferCloseAllButPinned
 | 
			
		||||
--                 :BufferCloseAllButCurrentOrPinned
 | 
			
		||||
--                 :BufferCloseBuffersLeft
 | 
			
		||||
--                 :BufferCloseBuffersRight
 | 
			
		||||
-- Magic buffer-picking mode
 | 
			
		||||
map('n', '<C-p>', '<Cmd>BufferPick<CR>', barbar_opts)
 | 
			
		||||
-- Sort automatically by...
 | 
			
		||||
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', barbar_opts)
 | 
			
		||||
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', barbar_opts)
 | 
			
		||||
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', barbar_opts)
 | 
			
		||||
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', barbar_opts)
 | 
			
		||||
 | 
			
		||||
-- Other:
 | 
			
		||||
-- :BarbarEnable - enables barbar (enabled by default)
 | 
			
		||||
-- :BarbarDisable - very bad command, should never be used
 | 
			
		||||
-- -- barbar
 | 
			
		||||
-- local barbar_opts = { noremap = true, silent = true }
 | 
			
		||||
--
 | 
			
		||||
-- -- Move to previous/next
 | 
			
		||||
-- map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<A-.>', '<Cmd>BufferNext<CR>', barbar_opts)
 | 
			
		||||
-- -- Re-order to previous/next
 | 
			
		||||
-- map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', barbar_opts)
 | 
			
		||||
-- -- Goto buffer in position...
 | 
			
		||||
-- map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<A-0>', '<Cmd>BufferLast<CR>', barbar_opts)
 | 
			
		||||
-- -- Pin/unpin buffer
 | 
			
		||||
-- map('n', '<A-p>', '<Cmd>BufferPin<CR>', barbar_opts)
 | 
			
		||||
-- -- Close buffer
 | 
			
		||||
-- map('n', '<A-c>', '<Cmd>BufferClose<CR>', barbar_opts)
 | 
			
		||||
-- -- Wipeout buffer
 | 
			
		||||
-- --                 :BufferWipeout
 | 
			
		||||
--
 | 
			
		||||
-- -- Close commands
 | 
			
		||||
-- --                 :BufferCloseAllButCurrent
 | 
			
		||||
-- --                 :BufferCloseAllButPinned
 | 
			
		||||
-- --                 :BufferCloseAllButCurrentOrPinned
 | 
			
		||||
-- --                 :BufferCloseBuffersLeft
 | 
			
		||||
-- --                 :BufferCloseBuffersRight
 | 
			
		||||
-- -- Magic buffer-picking mode
 | 
			
		||||
-- map('n', '<C-p>', '<Cmd>BufferPick<CR>', barbar_opts)
 | 
			
		||||
-- -- Sort automatically by...
 | 
			
		||||
-- map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', barbar_opts)
 | 
			
		||||
-- map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', barbar_opts)
 | 
			
		||||
--
 | 
			
		||||
-- -- Other:
 | 
			
		||||
-- -- :BarbarEnable - enables barbar (enabled by default)
 | 
			
		||||
-- -- :BarbarDisable - very bad command, should never be used
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-- Disable arrow keys
 | 
			
		||||
| 
						 | 
				
			
			@ -159,3 +159,6 @@ map('n', '<Leader>.', function() vim.lsp.buf.code_action({ apply = true}) end, {
 | 
			
		|||
 | 
			
		||||
-- Show telescope commands fuzzy finder
 | 
			
		||||
map('n', '<Leader><Leader>', function() require('telescope.builtin').commands() end, { desc = 'Show commands' })
 | 
			
		||||
 | 
			
		||||
-- Show diagnostics in floating window
 | 
			
		||||
map('n', '<Leader>e', function() vim.diagnostic.open_float() end, { desc = 'Show diagnostics' })
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -90,3 +90,40 @@ require('which-key').register({
 | 
			
		|||
-- indent-blankline setup
 | 
			
		||||
require('ibl').setup()
 | 
			
		||||
 | 
			
		||||
-- Marks setup
 | 
			
		||||
require('marks').setup({
 | 
			
		||||
    -- whether to map keybinds or not. default true
 | 
			
		||||
    default_mappings = true,
 | 
			
		||||
    -- which builtin marks to show. default {}
 | 
			
		||||
    -- builtin_marks = { ".", "<", ">", "^" },
 | 
			
		||||
    -- whether movements cycle back to the beginning/end of buffer. default true
 | 
			
		||||
    cyclic = true,
 | 
			
		||||
    -- whether the shada file is updated after modifying uppercase marks. default false
 | 
			
		||||
    force_write_shada = false,
 | 
			
		||||
    -- how often (in ms) to redraw signs/recompute mark positions.
 | 
			
		||||
    -- higher values will have better performance but may cause visual lag,
 | 
			
		||||
    -- while lower values may cause performance penalties. default 150.
 | 
			
		||||
    refresh_interval = 250,
 | 
			
		||||
    -- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase
 | 
			
		||||
    -- marks, and bookmarks.
 | 
			
		||||
    -- can be either a table with all/none of the keys, or a single number, in which case
 | 
			
		||||
    -- the priority applies to all marks.
 | 
			
		||||
    -- default 10.
 | 
			
		||||
    sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 },
 | 
			
		||||
    -- disables mark tracking for specific filetypes. default {}
 | 
			
		||||
    excluded_filetypes = {},
 | 
			
		||||
    -- disables mark tracking for specific buftypes. default {}
 | 
			
		||||
    excluded_buftypes = {},
 | 
			
		||||
    -- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
 | 
			
		||||
    -- sign/virttext. Bookmarks can be used to group together positions and quickly move
 | 
			
		||||
    -- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
 | 
			
		||||
    -- default virt_text is "".
 | 
			
		||||
    -- bookmark_0 = {
 | 
			
		||||
    --     sign = "⚑",
 | 
			
		||||
    --     virt_text = "bookmark_0",
 | 
			
		||||
    --     -- explicitly prompt for a virtual line annotation when setting a bookmark from this group.
 | 
			
		||||
    --     -- defaults to false.
 | 
			
		||||
    --     annotate = false,
 | 
			
		||||
    -- },
 | 
			
		||||
    mappings = {}
 | 
			
		||||
})
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -144,10 +144,10 @@ require("packer").startup(function()
 | 
			
		|||
    use { "jay-babu/mason-nvim-dap.nvim" }
 | 
			
		||||
 | 
			
		||||
    -- Tab
 | 
			
		||||
    use {
 | 
			
		||||
        'romgrk/barbar.nvim',
 | 
			
		||||
        requires = { 'kyazdani42/nvim-web-devicons' },
 | 
			
		||||
    }
 | 
			
		||||
    -- use {
 | 
			
		||||
    --     'romgrk/barbar.nvim',
 | 
			
		||||
    --     requires = { 'kyazdani42/nvim-web-devicons' },
 | 
			
		||||
    -- }
 | 
			
		||||
 | 
			
		||||
    use {
 | 
			
		||||
        "nvim-neorg/neorg",
 | 
			
		||||
| 
						 | 
				
			
			@ -177,6 +177,9 @@ require("packer").startup(function()
 | 
			
		|||
        end
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    -- Marks
 | 
			
		||||
    use("chentoast/marks.nvim")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    -- Automatically set up configuration after cloning packer.nvim
 | 
			
		||||
    if packer_bootstrap then
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue