Updated harpoon to harpoon v2
This commit is contained in:
		
							parent
							
								
									03affc6b7f
								
							
						
					
					
						commit
						98a1570fc3
					
				|  | @ -1,18 +1,75 @@ | ||||||
| return { | return { | ||||||
|   'ThePrimeagen/harpoon', |   'ThePrimeagen/harpoon', | ||||||
|   lazy = false, |   lazy = false, | ||||||
|  |   branch = 'harpoon2', | ||||||
|   dependencies = { |   dependencies = { | ||||||
|     'nvim-lua/plenary.nvim', |     'nvim-lua/plenary.nvim', | ||||||
|   }, |   }, | ||||||
|   config = true, |   config = function() | ||||||
|  |     require('harpoon'):setup() | ||||||
|  |   end, | ||||||
|   keys = { |   keys = { | ||||||
|     { '<C-m>', "<cmd>lua require('harpoon.mark').add_file()<cr>", desc = 'Mark file with harpoon' }, |     { | ||||||
|     { '<C-]>', "<cmd>lua require('harpoon.ui').nav_next()<cr>", desc = 'Go to next harpoon mark' }, |       '<C-m>', | ||||||
|     { '<C-[>', "<cmd>lua require('harpoon.ui').nav_prev()<cr>", desc = 'Go to previous harpoon mark' }, |       function() | ||||||
|     { '<C-o>', "<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>", desc = 'Show harpoon marks' }, |         require('harpoon'):list():add() | ||||||
|     { '<leader>om', "<cmd>lua require('harpoon.mark').add_file()<cr>", desc = 'Mark file with harpoon' }, |       end, | ||||||
|     { '<leader>o[', "<cmd>lua require('harpoon.ui').nav_next()<cr>", desc = 'Go to next harpoon mark' }, |       desc = 'Mark file with harpoon', | ||||||
|     { '<leader>o]', "<cmd>lua require('harpoon.ui').nav_prev()<cr>", desc = 'Go to previous harpoon mark' }, |     }, | ||||||
|     { '<leader>oo', "<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>", desc = 'Show harpoon marks' }, |     { | ||||||
|  |       '<C-]>', | ||||||
|  |       function() | ||||||
|  |         require('harpoon'):list():next() | ||||||
|  |       end, | ||||||
|  |       desc = 'Go to next harpoon mark', | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       '<C-[>', | ||||||
|  |       function() | ||||||
|  |         require('harpoon'):list():prev() | ||||||
|  |       end, | ||||||
|  |       desc = 'Go to previous harpoon mark', | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       '<C-o>', | ||||||
|  |       function() | ||||||
|  |         local harpoon = require 'harpoon' | ||||||
|  |         harpoon.ui:toggle_quick_menu(require('harpoon'):list()) | ||||||
|  |       end, | ||||||
|  |       desc = 'Show harpoon marks', | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       '<leader>om', | ||||||
|  |       function() | ||||||
|  |         require('harpoon'):list():add() | ||||||
|  |       end, | ||||||
|  |       desc = 'Mark file with harpoon', | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       '<leader>o[', | ||||||
|  |       function() | ||||||
|  |         require('harpoon'):list():next() | ||||||
|  |       end, | ||||||
|  |       desc = 'Go to next harpoon mark', | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       '<leader>o]', | ||||||
|  |       function() | ||||||
|  |         require('harpoon'):list():prev() | ||||||
|  |       end, | ||||||
|  |       desc = 'Go to previous harpoon mark', | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       '<leader>oo', | ||||||
|  |       function() | ||||||
|  |         local harpoon = require 'harpoon' | ||||||
|  |         harpoon.ui:toggle_quick_menu(require('harpoon'):list()) | ||||||
|  |       end, | ||||||
|  |       desc = 'Show harpoon marks', | ||||||
|  |     }, | ||||||
|   }, |   }, | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | -- Good example of converting commands from normal VIM setup to lazy setup: | ||||||
|  | --    https://github.com/ThePrimeagen/harpoon/tree/harpoon2 | ||||||
|  | --    https://www.reddit.com/r/neovim/comments/18as0nm/harpoon2_branch_lazy_vim_setup | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue