mirror of
				https://github.com/WarrenHood/dotfiles.git
				synced 2025-11-04 08:38:41 +00:00 
			
		
		
		
	
							parent
							
								
									0c216f8f8d
								
							
						
					
					
						commit
						419f0fe8d3
					
				| 
						 | 
					@ -101,61 +101,64 @@ if vim.g.neovide then
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- barbar
 | 
					-- -- barbar
 | 
				
			||||||
local barbar_opts = { noremap = true, silent = true }
 | 
					-- local barbar_opts = { noremap = true, silent = true }
 | 
				
			||||||
 | 
					--
 | 
				
			||||||
-- Move to previous/next
 | 
					-- -- Move to previous/next
 | 
				
			||||||
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', barbar_opts)
 | 
					-- map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', barbar_opts)
 | 
				
			||||||
map('n', '<A-.>', '<Cmd>BufferNext<CR>', barbar_opts)
 | 
					-- map('n', '<A-.>', '<Cmd>BufferNext<CR>', barbar_opts)
 | 
				
			||||||
-- Re-order to previous/next
 | 
					-- -- Re-order to previous/next
 | 
				
			||||||
map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', barbar_opts)
 | 
					-- map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', barbar_opts)
 | 
				
			||||||
map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', barbar_opts)
 | 
					-- map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', barbar_opts)
 | 
				
			||||||
-- Goto buffer in position...
 | 
					-- -- Goto buffer in position...
 | 
				
			||||||
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', barbar_opts)
 | 
					-- map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', barbar_opts)
 | 
				
			||||||
map('n', '<A-2>', '<Cmd>BufferGoto 2<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-3>', '<Cmd>BufferGoto 3<CR>', barbar_opts)
 | 
				
			||||||
map('n', '<A-4>', '<Cmd>BufferGoto 4<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-5>', '<Cmd>BufferGoto 5<CR>', barbar_opts)
 | 
				
			||||||
map('n', '<A-6>', '<Cmd>BufferGoto 6<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-7>', '<Cmd>BufferGoto 7<CR>', barbar_opts)
 | 
				
			||||||
map('n', '<A-8>', '<Cmd>BufferGoto 8<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-9>', '<Cmd>BufferGoto 9<CR>', barbar_opts)
 | 
				
			||||||
map('n', '<A-0>', '<Cmd>BufferLast<CR>', barbar_opts)
 | 
					-- map('n', '<A-0>', '<Cmd>BufferLast<CR>', barbar_opts)
 | 
				
			||||||
-- Pin/unpin buffer
 | 
					-- -- Pin/unpin buffer
 | 
				
			||||||
map('n', '<A-p>', '<Cmd>BufferPin<CR>', barbar_opts)
 | 
					-- map('n', '<A-p>', '<Cmd>BufferPin<CR>', barbar_opts)
 | 
				
			||||||
-- Close buffer
 | 
					-- -- Close buffer
 | 
				
			||||||
map('n', '<A-c>', '<Cmd>BufferClose<CR>', barbar_opts)
 | 
					-- map('n', '<A-c>', '<Cmd>BufferClose<CR>', barbar_opts)
 | 
				
			||||||
-- Wipeout buffer
 | 
					-- -- Wipeout buffer
 | 
				
			||||||
--                 :BufferWipeout
 | 
					-- --                 :BufferWipeout
 | 
				
			||||||
 | 
					--
 | 
				
			||||||
-- Close commands
 | 
					-- -- Close commands
 | 
				
			||||||
--                 :BufferCloseAllButCurrent
 | 
					-- --                 :BufferCloseAllButCurrent
 | 
				
			||||||
--                 :BufferCloseAllButPinned
 | 
					-- --                 :BufferCloseAllButPinned
 | 
				
			||||||
--                 :BufferCloseAllButCurrentOrPinned
 | 
					-- --                 :BufferCloseAllButCurrentOrPinned
 | 
				
			||||||
--                 :BufferCloseBuffersLeft
 | 
					-- --                 :BufferCloseBuffersLeft
 | 
				
			||||||
--                 :BufferCloseBuffersRight
 | 
					-- --                 :BufferCloseBuffersRight
 | 
				
			||||||
-- Magic buffer-picking mode
 | 
					-- -- Magic buffer-picking mode
 | 
				
			||||||
map('n', '<C-p>', '<Cmd>BufferPick<CR>', barbar_opts)
 | 
					-- map('n', '<C-p>', '<Cmd>BufferPick<CR>', barbar_opts)
 | 
				
			||||||
-- Sort automatically by...
 | 
					-- -- Sort automatically by...
 | 
				
			||||||
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', barbar_opts)
 | 
					-- map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', barbar_opts)
 | 
				
			||||||
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', barbar_opts)
 | 
					-- map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', barbar_opts)
 | 
				
			||||||
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', barbar_opts)
 | 
					-- map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', barbar_opts)
 | 
				
			||||||
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', barbar_opts)
 | 
					-- map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', barbar_opts)
 | 
				
			||||||
 | 
					--
 | 
				
			||||||
-- Other:
 | 
					-- -- Other:
 | 
				
			||||||
-- :BarbarEnable - enables barbar (enabled by default)
 | 
					-- -- :BarbarEnable - enables barbar (enabled by default)
 | 
				
			||||||
-- :BarbarDisable - very bad command, should never be used
 | 
					-- -- :BarbarDisable - very bad command, should never be used
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Disable arrow keys
 | 
					-- Disable arrow keys
 | 
				
			||||||
local arrows = {'<Up>', '<Down>', '<Left>', '<Right>'}
 | 
					local arrows = { '<Up>', '<Down>', '<Left>', '<Right>' }
 | 
				
			||||||
for i=1,#arrows do
 | 
					for i = 1, #arrows do
 | 
				
			||||||
    map('n', arrows[i], function () end)
 | 
					    map('n', arrows[i], function() end)
 | 
				
			||||||
    map('i', arrows[i], function () end)
 | 
					    map('i', arrows[i], function() end)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Code actions with ctrl + .
 | 
					-- Code actions with ctrl + .
 | 
				
			||||||
map('n', '<Leader>.', function() vim.lsp.buf.code_action({ apply = true}) end, { desc = 'Code action/Quick fix' })
 | 
					map('n', '<Leader>.', function() vim.lsp.buf.code_action({ apply = true }) end, { desc = 'Code action/Quick fix' })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Show telescope commands fuzzy finder
 | 
					-- Show telescope commands fuzzy finder
 | 
				
			||||||
map('n', '<Leader><Leader>', function() require('telescope.builtin').commands() end, { desc = 'Show commands' })
 | 
					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' })
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,87 +2,87 @@
 | 
				
			||||||
require("nvim-tree").setup()
 | 
					require("nvim-tree").setup()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- tree-sitter config
 | 
					-- tree-sitter config
 | 
				
			||||||
require'nvim-treesitter.configs'.setup {
 | 
					require 'nvim-treesitter.configs'.setup {
 | 
				
			||||||
  -- A list of parser names, or "all"
 | 
					    -- A list of parser names, or "all"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ensure_installed = { "c", "lua", "rust", "bash", "python", "javascript" },
 | 
					    ensure_installed = { "c", "lua", "rust", "bash", "python", "javascript" },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  -- Install parsers synchronously (only applied to `ensure_installed`)
 | 
					    -- Install parsers synchronously (only applied to `ensure_installed`)
 | 
				
			||||||
  sync_install = false,
 | 
					    sync_install = false,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  -- Automatically install missing parsers when entering buffer
 | 
					    -- Automatically install missing parsers when entering buffer
 | 
				
			||||||
  -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
 | 
					    -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
 | 
				
			||||||
  auto_install = true,
 | 
					    auto_install = true,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  highlight = {
 | 
					    highlight = {
 | 
				
			||||||
    enable = true,
 | 
					        enable = true,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    additional_vim_regex_highlighting = false,
 | 
					        additional_vim_regex_highlighting = false,
 | 
				
			||||||
  },
 | 
					    },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- luasnip config
 | 
					-- luasnip config
 | 
				
			||||||
require("luasnip").config.set_config({ -- Setting LuaSnip config
 | 
					require("luasnip").config.set_config({ -- Setting LuaSnip config
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  -- Enable autotriggered snippets
 | 
					    -- Enable autotriggered snippets
 | 
				
			||||||
  enable_autosnippets = true,
 | 
					    enable_autosnippets = true,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  -- Use Tab (or some other key if you prefer) to trigger visual selection
 | 
					    -- Use Tab (or some other key if you prefer) to trigger visual selection
 | 
				
			||||||
  store_selection_keys = "<Tab>",
 | 
					    store_selection_keys = "<Tab>",
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
require("luasnip.loaders.from_lua").load({paths = "~/.config/nvim/LuaSnip/"})
 | 
					require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/LuaSnip/" })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Which-key config
 | 
					-- Which-key config
 | 
				
			||||||
require('which-key').setup()
 | 
					require('which-key').setup()
 | 
				
			||||||
require('which-key').register({
 | 
					require('which-key').register({
 | 
				
			||||||
	d = {
 | 
					    d = {
 | 
				
			||||||
		name = "Debug",
 | 
					        name = "Debug",
 | 
				
			||||||
		s = {
 | 
					        s = {
 | 
				
			||||||
			name = "Step",
 | 
					            name = "Step",
 | 
				
			||||||
			c = { "<cmd>lua require('dap').continue()<CR>", "Continue" },
 | 
					            c = { "<cmd>lua require('dap').continue()<CR>", "Continue" },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			v = { "<cmd>lua require('dap').step_over()<CR>", "Step Over" },
 | 
					            v = { "<cmd>lua require('dap').step_over()<CR>", "Step Over" },
 | 
				
			||||||
			i = { "<cmd>lua require('dap').step_into()<CR>", "Step Into" },
 | 
					            i = { "<cmd>lua require('dap').step_into()<CR>", "Step Into" },
 | 
				
			||||||
			o = { "<cmd>lua require('dap').step_out()<CR>", "Step Out" },
 | 
					            o = { "<cmd>lua require('dap').step_out()<CR>", "Step Out" },
 | 
				
			||||||
		},
 | 
					        },
 | 
				
			||||||
		h = {
 | 
					        h = {
 | 
				
			||||||
			name = "Hover",
 | 
					            name = "Hover",
 | 
				
			||||||
			h = { "<cmd>lua require('dap.ui.variables').hover()<CR>", "Hover" },
 | 
					            h = { "<cmd>lua require('dap.ui.variables').hover()<CR>", "Hover" },
 | 
				
			||||||
			v = { "<cmd>lua require('dap.ui.variables').visual_hover()<CR>", "Visual Hover" },
 | 
					            v = { "<cmd>lua require('dap.ui.variables').visual_hover()<CR>", "Visual Hover" },
 | 
				
			||||||
		},
 | 
					        },
 | 
				
			||||||
		u = {
 | 
					        u = {
 | 
				
			||||||
			name = "UI",
 | 
					            name = "UI",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			h = { "<cmd>lua require('dap.ui.widgets').hover()<CR>", "Hover" },
 | 
					            h = { "<cmd>lua require('dap.ui.widgets').hover()<CR>", "Hover" },
 | 
				
			||||||
			f = { "local widgets=require('dap.ui.widgets');widgets.centered_float(widgets.scopes)<CR>", "Float" },
 | 
					            f = { "local widgets=require('dap.ui.widgets');widgets.centered_float(widgets.scopes)<CR>", "Float" },
 | 
				
			||||||
		},
 | 
					        },
 | 
				
			||||||
		r = {
 | 
					        r = {
 | 
				
			||||||
			name = "Repl",
 | 
					            name = "Repl",
 | 
				
			||||||
			o = { "<cmd>lua require('dap').repl.open()<CR>", "Open" },
 | 
					            o = { "<cmd>lua require('dap').repl.open()<CR>", "Open" },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			l = { "<cmd>lua require('dap').repl.run_last()<CR>", "Run Last" },
 | 
					            l = { "<cmd>lua require('dap').repl.run_last()<CR>", "Run Last" },
 | 
				
			||||||
		},
 | 
					        },
 | 
				
			||||||
		b = {
 | 
					        b = {
 | 
				
			||||||
			name = "Breakpoints",
 | 
					            name = "Breakpoints",
 | 
				
			||||||
			c = {
 | 
					            c = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				"<cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<CR>",
 | 
					                "<cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<CR>",
 | 
				
			||||||
				"Breakpoint Condition",
 | 
					                "Breakpoint Condition",
 | 
				
			||||||
			},
 | 
					            },
 | 
				
			||||||
			m = {
 | 
					            m = {
 | 
				
			||||||
				"<cmd>lua require('dap').set_breakpoint({ nil, nil, vim.fn.input('Log point message: ') })<CR>",
 | 
					                "<cmd>lua require('dap').set_breakpoint({ nil, nil, vim.fn.input('Log point message: ') })<CR>",
 | 
				
			||||||
				"Log Point Message",
 | 
					                "Log Point Message",
 | 
				
			||||||
			},
 | 
					            },
 | 
				
			||||||
			t = { "<cmd>lua require('dap').toggle_breakpoint()<CR>", "Create" },
 | 
					            t = { "<cmd>lua require('dap').toggle_breakpoint()<CR>", "Create" },
 | 
				
			||||||
		},
 | 
					        },
 | 
				
			||||||
		c = { "<cmd>lua require('dap').scopes()<CR>", "Scopes" },
 | 
					        c = { "<cmd>lua require('dap').scopes()<CR>", "Scopes" },
 | 
				
			||||||
		i = { "<cmd>lua require('dap').toggle()<CR>", "Toggle" },
 | 
					        i = { "<cmd>lua require('dap').toggle()<CR>", "Toggle" },
 | 
				
			||||||
	},
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}, { prefix = "<leader>" })
 | 
					}, { prefix = "<leader>" })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -90,3 +90,40 @@ require('which-key').register({
 | 
				
			||||||
-- indent-blankline setup
 | 
					-- indent-blankline setup
 | 
				
			||||||
require('ibl').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" }
 | 
					    use { "jay-babu/mason-nvim-dap.nvim" }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    -- Tab
 | 
					    -- Tab
 | 
				
			||||||
    use {
 | 
					    -- use {
 | 
				
			||||||
        'romgrk/barbar.nvim',
 | 
					    --     'romgrk/barbar.nvim',
 | 
				
			||||||
        requires = { 'kyazdani42/nvim-web-devicons' },
 | 
					    --     requires = { 'kyazdani42/nvim-web-devicons' },
 | 
				
			||||||
    }
 | 
					    -- }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    use {
 | 
					    use {
 | 
				
			||||||
        "nvim-neorg/neorg",
 | 
					        "nvim-neorg/neorg",
 | 
				
			||||||
| 
						 | 
					@ -177,6 +177,9 @@ require("packer").startup(function()
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    -- Marks
 | 
				
			||||||
 | 
					    use("chentoast/marks.nvim")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    -- Automatically set up configuration after cloning packer.nvim
 | 
					    -- Automatically set up configuration after cloning packer.nvim
 | 
				
			||||||
    if packer_bootstrap then
 | 
					    if packer_bootstrap then
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue