diff --git a/lua/core/keymaps.lua b/lua/core/keymaps.lua index 2ebaa50..bbccfc5 100644 --- a/lua/core/keymaps.lua +++ b/lua/core/keymaps.lua @@ -4,6 +4,7 @@ local function map(mode, lhs, rhs, opts) vim.keymap.set(mode, lhs, rhs, opts) end local opts = { noremap = true, silent = true } +local icons = require('lib.icons') -- Space as leader map('n', '', '', opts) @@ -77,4 +78,34 @@ map('i', '', function() return vim.fn['codeium#Clear']() end, { expr = true map('n', 'e', function() require("oil").toggle_float() -end) +end, { desc = icons.documents.OpenFolder .. 'File Explorer' }) + +map('n', 'ha', function() + harpoon:list():append() +end, { desc = 'Add Mark' }) +map('n', 'hh', function() + toggle_telescope(harpoon:list()) +end, { desc = 'Telescope Marks' }) +map('n', 'hm', function() + harpoon.ui:toggle_quick_menu(harpoon:list()) +end, { desc = 'Open UI' }) + +map('n', '[h', function() + harpoon:list():prev() +end, { desc = 'Prev Mark' }) +map('n', ']h', function() + harpoon:list():next() +end, { desc = 'Next Mark' }) + +map('n', 'hk', function() + harpoon:list():prev() +end, { desc = 'Prev Mark' }) +map('n', 'hj', function() + harpoon:list():next() +end, { desc = 'Next Mark' }) + +for i = 1, 9 do + map('n', 'h' .. i, function() + harpoon:list():select(i) + end, { desc = 'Mark ' .. i }) +end