From 94502eca9f6d0c8cdc83c5ee145ae7272f0c6051 Mon Sep 17 00:00:00 2001 From: cool-mist Date: Sun, 7 Apr 2024 23:45:55 +0530 Subject: [PATCH] lazy load harpoon --- init.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 384a85b..4ffc418 100644 --- a/init.lua +++ b/init.lua @@ -247,14 +247,11 @@ lazy.setup({ "ThePrimeagen/harpoon", branch = "harpoon2", dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - local harpoon = require("harpoon") - harpoon.setup({}) - - local opts = { noremap = true, silent = true } - V.keymap.set('n', 'hh', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, opts) - V.keymap.set('n', 'ha', function() harpoon:list():append() end, opts) - end + config = true, + keys = { + { 'hh', function() require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end, desc = "[H]arpoon [H]ome" }, + { 'ha', function() require("harpoon"):list():append() end, desc = "[H]arpoon [A]ppend" }, + }, }, ---------------