diff --git a/init.lua b/init.lua index bb8ad1ae..886a1aa0 100644 --- a/init.lua +++ b/init.lua @@ -326,6 +326,7 @@ require('lazy').setup({ -- Useful for getting pretty icons, but requires a Nerd Font. { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, + { 'ThePrimeagen/harpoon' }, }, config = function() -- Telescope is a fuzzy finder that comes with a lot of different things that @@ -369,6 +370,7 @@ require('lazy').setup({ -- Enable Telescope extensions if they are installed pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'ui-select') + pcall(require('telescope').load_extension, 'harpoon') -- See `:help telescope.builtin` local builtin = require 'telescope.builtin' diff --git a/lua/custom/plugins/harpoon.lua b/lua/custom/plugins/harpoon.lua new file mode 100644 index 00000000..4b2ed1b1 --- /dev/null +++ b/lua/custom/plugins/harpoon.lua @@ -0,0 +1,21 @@ +local mark = require 'harpoon.mark' +local ui = require 'harpoon.ui' + +vim.keymap.set('n', 'a', mark.add_file, { desc = '[A]dd harpoon mark' }) +vim.keymap.set('n', 'sm', require('telescope').extensions.harpoon.marks, { desc = '[S]earch harpoon [M]' }) +vim.keymap.set('n', '', ui.toggle_quick_menu) + +vim.keymap.set('n', '', function() + ui.nav_file(1) +end) +vim.keymap.set('n', '', function() + ui.nav_file(2) +end) +vim.keymap.set('n', '', function() + ui.nav_file(3) +end) +vim.keymap.set('n', '', function() + ui.nav_file(4) +end) + +return {}