Add harpoon
This commit is contained in:
parent
4e4e7e8d92
commit
aa42105b2b
@ -48,6 +48,10 @@
|
||||
possession-nvim = pkgs.callPackage ./possession-nvim.nix {
|
||||
inherit (pkgs.vimUtils) buildVimPlugin;
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
};
|
||||
harpoon-nvim = pkgs.callPackage ./harpoon-nvim.nix {
|
||||
inherit (pkgs.vimUtils) buildVimPluginFrom2Nix;
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
};
|
||||
expected-parsers = (pkgs.lib.attrVals [
|
||||
"tree-sitter-rust"
|
||||
@ -131,7 +135,7 @@ EOF";
|
||||
vim-dadbod
|
||||
vim-dadbod-ui
|
||||
vim-dadbod-completion
|
||||
]) ++ [ possession-nvim ];
|
||||
]) ++ [ possession-nvim harpoon-nvim ];
|
||||
};
|
||||
};
|
||||
|
||||
|
10
nix/base-system/harpoon-nvim.nix
Normal file
10
nix/base-system/harpoon-nvim.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{buildVimPluginFrom2Nix, fetchFromGitHub, ...}:
|
||||
buildVimPluginFrom2Nix rec {
|
||||
name = "harpoon";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ThePrimeagen";
|
||||
repo = name;
|
||||
rev = "harpoon2";
|
||||
hash = "sha256-vFK9rxa1BoWSTi9zKTNKucUUD3piK8Yfq8DCVio26A4=";
|
||||
};
|
||||
}
|
@ -484,6 +484,18 @@ telescope.setup({
|
||||
},
|
||||
})
|
||||
|
||||
local harpoon = require('harpoon')
|
||||
|
||||
harpoon:setup()
|
||||
|
||||
vim.keymap.set("n", "<leader>ha", function() harpoon:list():append() end)
|
||||
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
|
||||
--vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
|
||||
--vim.keymap.set("n", "<C-t>", function() harpoon:list():select(2) end)
|
||||
--vim.keymap.set("n", "<C-n>", function() harpoon:list():select(3) end)
|
||||
--vim.keymap.set("n", "<C-s>", function() harpoon:list():select(4) end)
|
||||
|
||||
vim.keymap.set("n", "<leader>pl", telescope.extensions.possession.list)
|
||||
vim.keymap.set("n", "<Leader>nff", telescope_builtins.fd)
|
||||
vim.keymap.set("n", "<Leader>rl", telescope_builtins.lsp_references)
|
||||
|
6
nix/darwin/flake.lock
generated
6
nix/darwin/flake.lock
generated
@ -36,12 +36,12 @@
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1,
|
||||
"narHash": "sha256-AbnaXSoMfu+ZAuilXQWdiwbmTcxzwO1DHbS3dSsQF6g=",
|
||||
"path": "/nix/store/grgx777xbxak3qgxi8z6px8zczbkks2a-source/nix/base-system",
|
||||
"narHash": "sha256-TCMfmw3dGAVMO2334x8dhbYn+I0UHJWx3s4joZglEgw=",
|
||||
"path": "/nix/store/cfch4cncvmvf7lv4b4g835wk97q8ypl0-source/nix/base-system",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"path": "/nix/store/grgx777xbxak3qgxi8z6px8zczbkks2a-source/nix/base-system",
|
||||
"path": "/nix/store/cfch4cncvmvf7lv4b4g835wk97q8ypl0-source/nix/base-system",
|
||||
"type": "path"
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user