From 1b54cef383faf210418229a937eb89a35c76a1a5 Mon Sep 17 00:00:00 2001 From: spinach <19keegandeppe@gmail.com> Date: Mon, 17 Apr 2023 16:02:03 -0400 Subject: [PATCH] fixing harpoon binds --- config/init.lua | 2 +- config/lua/keymap.lua | 18 ++++++++---------- config/lua/plugins.lua | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/config/init.lua b/config/init.lua index 575602b..09de769 100644 --- a/config/init.lua +++ b/config/init.lua @@ -1,5 +1,5 @@ -require('keymap') require('plugins') +require('keymap') require('autobuf') -- prevent cursor override diff --git a/config/lua/keymap.lua b/config/lua/keymap.lua index 9a4174e..a687a95 100644 --- a/config/lua/keymap.lua +++ b/config/lua/keymap.lua @@ -38,15 +38,13 @@ vim.keymap.set('n', 'pg', '"+p') vim.keymap.set("n", "d", ":lua require('nvim-tree.api').tree.toggle_hidden_filter()") -- harpoon bindings -local harpoon = require('harpoon.ui') - vim.keymap.set("n", "hh", ":Telescope harpoon marks") -vim.keymap.set("n", "ha", harpoon.add_file, {}) -vim.keymap.set("n", "hn", harpoon.nav_next, {}) -vim.keymap.set("n", "hp", harpoon.nav_prev, {}) +vim.keymap.set("n", "ha", ":lua require(harpoon.ui).add_file()" +vim.keymap.set("n", "hn", ":lua require(harpoon.ui).nav_next()" +vim.keymap.set("n", "hp", ":lua require(harpoon.ui).nav_prev()" -- jumping to specific files -vim.keymap.set("n", "h1", harpoon.nav_file, {1}) -vim.keymap.set("n", "h2", harpoon.nav_file, {2}) -vim.keymap.set("n", "h3", harpoon.nav_file, {3}) -vim.keymap.set("n", "h4", harpoon.nav_file, {4}) -vim.keymap.set("n", "h5", harpoon.nav_file, {5}) +vim.keymap.set("n", "h1", ":lua require(harpoon.ui).nav_file(1)" +vim.keymap.set("n", "h2", ":lua require(harpoon.ui).nav_file(2)" +vim.keymap.set("n", "h3", ":lua require(harpoon.ui).nav_file(3)" +vim.keymap.set("n", "h4", ":lua require(harpoon.ui).nav_file(4)" +vim.keymap.set("n", "h5", ":lua require(harpoon.ui).nav_file(5)" diff --git a/config/lua/plugins.lua b/config/lua/plugins.lua index 288d698..4afa820 100644 --- a/config/lua/plugins.lua +++ b/config/lua/plugins.lua @@ -49,4 +49,4 @@ require('telescope').setup({ }, }) -require.('telescope).load_extension('harpoon') +require.('telescope').load_extension('harpoon')