Adding harpoon

This commit is contained in:
Zoe Roux
2022-04-01 23:20:34 +02:00
parent 93c3fc5245
commit 8946e447a6
5 changed files with 42 additions and 2 deletions
+5 -2
View File
@@ -44,15 +44,18 @@ return packer.startup(function(use)
use "tpope/vim-surround"
use{ "tpope/vim-unimpaired", config = function() vim.g.nremap = { ["[u"] = "", ["]u"] = "" } end }
use { "tpope/vim-unimpaired", config = function() vim.g.nremap = { ["[u"] = "", ["]u"] = "" } end }
use "tpope/vim-speeddating"
use "tpope/vim-repeat"
use "tpope/vim-sleuth"
use "ggandor/lightspeed.nvim"
use "nishigori/increment-activator"
use { "airblade/vim-rooter", config = function() vim.g.rooter_manual_only = 1 end }
use { "Pocco81/AutoSave.nvim", config = function() require "autosave".setup() end }
use "ggandor/lightspeed.nvim"
use "ThePrimeagen/harpoon"
use "folke/tokyonight.nvim"
+7
View File
@@ -62,7 +62,14 @@ keymap("i", "<A-h>", "<Left>", opts)
keymap("i", "<A-l>", "<Right>", opts)
keymap("i", "<C-BS>", "<C-w>", opts)
keymap("c", "<C-BS>", "<C-w>", opts)
keymap("i", "<C-H>", "<C-w>", opts) -- Keymap for CTRL-BACKSPACE on some termial emulators.
keymap("c", "<C-H>", "<C-w>", opts)
keymap("n", "<leader>y", '"+y', opts)
keymap("x", "<leader>y", '"+y', opts)
keymap("n", "<leader>Y", '"+Y', opts)
keymap("x", "<leader>Y", '"+Y', opts)
vim.cmd [[
augroup highlight_yank
@@ -0,0 +1,22 @@
local ok, harpoon = pcall(require, "harpoon")
if not ok then
return
end
harpoon.setup({
mark_branch = true,
})
local wk = require "which-key"
wk.register({
["<C-H>"] = { '<cmd>lua require("harpoon.ui").nav_file(1)<CR>', "Navigate to harpoon 1" },
["<C-T>"] = { '<cmd>lua require("harpoon.ui").nav_file(2)<CR>', "Navigate to harpoon 2" },
["<C-N>"] = { '<cmd>lua require("harpoon.ui").nav_file(3)<CR>', "Navigate to harpoon 3" },
["<C-S>"] = { '<cmd>lua require("harpoon.ui").nav_file(4)<CR>', "Navigate to harpoon 4" },
})
wk.register({
a = { '<cmd>lua require("harpoon.mark").add_file()<CR>', "Mark file" },
h = { '<cmd>lua require("harpoon.ui").toggle_quick_menu()<CR>', "Harpoon menu" },
}, {
prefix = "<leader>"
})
@@ -5,4 +5,5 @@ require "windows.trouble"
require "windows.scrollbar"
require "windows.colorcolumn"
require "windows.tree"
require "windows.harpoon"
@@ -30,3 +30,10 @@ wk.register({
noremap = false,
})
wk.register({
y = { "Yank to system clipboard" },
Y = { "Yank line to system clipboard" },
}, {
prefix = "<leader>"
})