add nvim-harpoon

This commit is contained in:
LordMZTE 2022-12-23 00:08:07 +01:00
parent 11f365917a
commit 847c5a9634
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
3 changed files with 17 additions and 2 deletions

View file

@ -0,0 +1,7 @@
local map = vim.api.nvim_set_keymap
require("harpoon").setup {}
map("n", "ma", [[<cmd>lua require("harpoon.mark").toggle_file()<cr>]], { silent = true })
map("n", "mn", [[<cmd>lua require("harpoon.ui").nav_next()<cr>]], { silent = true })
map("n", "mp", [[<cmd>lua require("harpoon.ui").nav_prev()<cr>]], { silent = true })

View file

@ -1,6 +1,7 @@
local telescope = require "telescope"
local map = vim.api.nvim_set_keymap
require("telescope").setup {
telescope.setup {
defaults = {
vimgrep_arguments = {
"rg",
@ -27,8 +28,10 @@ require("telescope").setup {
},
}
require("telescope").load_extension "ui-select"
telescope.load_extension "ui-select"
telescope.load_extension "harpoon"
map("n", "ff", "<cmd>Telescope find_files<cr>", { silent = true })
map("n", "fg", "<cmd>Telescope live_grep<cr>", { silent = true })
map("n", "gs", "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>", { silent = true })
map("n", "gm", "<cmd>Telescope harpoon marks<cr>", { silent = true })

View file

@ -178,6 +178,11 @@ require("packer").startup(function(use)
requires = "rcarriga/nvim-dap-ui",
}
use {
"ThePrimeagen/harpoon",
config = pconf "nvim_harpoon",
}
cmp_plugins(use)
end)