From cf9605f7a01ef90050df2f5aafa3b89db492604f Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Tue, 4 Apr 2023 00:15:10 +0200 Subject: feat(impro) add plugins and configs --- lua/plugins/harpoon.lua | 64 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 4 deletions(-) (limited to 'lua/plugins/harpoon.lua') diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua index d8a4b70..06ec2aa 100644 --- a/lua/plugins/harpoon.lua +++ b/lua/plugins/harpoon.lua @@ -1,11 +1,67 @@ +local keys = {} +local terms = 3 +local binds = 5 + +table.insert(keys, { + "ss", + function() + require("harpoon.ui").toggle_quick_menu() + end, +}) + +table.insert(keys, { + "sa", + function() + require("harpoon.mark").add_file() + end, +}) + +table.insert(keys, { + "st", + function () + vim.api.nvim_command([[vsplit]]) + require("harpoon.term").gotoTerminal(1) + vim.api.nvim_command([[startinsert]]) + end +}) + +for i = 1, terms do + table.insert(keys, { + string.format("%s", i), + function() + require("harpoon.term").gotoTerminal(i) + end, + }) +end + +for i = 1, binds do + table.insert(keys, { + string.format("%s", i), + function() + require("harpoon.ui").nav_file(i) + end, + }) +end + return { "ThePrimeagen/harpoon", dependencies = { "nvim-lua/plenary.nvim", "nvim-lua/popup.nvim", }, - keys = require("alpha.harpoon").keymaps, - config = function() - require("alpha.harpoon").setup() - end, + keys = keys, + opts = { + global_settings = { + enter_on_sendcmd = true, + }, + projects = { + ["$HOME/code/svelte/snippets"] = { + term = { + cmds = { + "npm run dev", + }, + }, + }, + }, + }, } -- cgit v1.2.3