Add nvim-lazy submodule and add plugin configuration.
This commit is contained in:
parent
f545e30831
commit
b1ad0b623a
39 changed files with 1599 additions and 0 deletions
88
pkgsets/nvim/harpoon.nix
Normal file
88
pkgsets/nvim/harpoon.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
lib.mkIf (lib.elem "nvim::harpoon" config.machine.pkgs) {
|
||||
programs.nvim-lazy.lazyPlugins = [
|
||||
{
|
||||
dir = vPlug: vPlug.harpoon2;
|
||||
lazy = true;
|
||||
keys =
|
||||
[
|
||||
{
|
||||
bind = "<leader>ha";
|
||||
cmdIsFunction = true;
|
||||
cmd = # lua
|
||||
''
|
||||
function()
|
||||
require("harpoon"):list():add()
|
||||
end
|
||||
'';
|
||||
}
|
||||
{
|
||||
bind = "<leader>he";
|
||||
cmdIsFunction = true;
|
||||
cmd = # lua
|
||||
''
|
||||
function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end
|
||||
'';
|
||||
}
|
||||
{
|
||||
bind = "<C-h>";
|
||||
cmdIsFunction = true;
|
||||
cmd = # lua
|
||||
''
|
||||
function()
|
||||
require("harpoon"):list():select(1)
|
||||
end
|
||||
'';
|
||||
}
|
||||
{
|
||||
bind = "<C-j>";
|
||||
cmdIsFunction = true;
|
||||
cmd = # lua
|
||||
''
|
||||
function()
|
||||
require("harpoon"):list():select(2)
|
||||
end
|
||||
'';
|
||||
}
|
||||
{
|
||||
bind = "<C-k>";
|
||||
cmdIsFunction = true;
|
||||
cmd = # lua
|
||||
''
|
||||
function()
|
||||
require("harpoon"):list():select(3)
|
||||
end
|
||||
'';
|
||||
}
|
||||
{
|
||||
bind = "<C-l>";
|
||||
cmdIsFunction = true;
|
||||
cmd = # lua
|
||||
''
|
||||
function()
|
||||
require("harpoon"):list():select(4)
|
||||
end
|
||||
'';
|
||||
}
|
||||
]
|
||||
++ (map (num: {
|
||||
bind = "<leader>h${toString (lib.mod num 10)}";
|
||||
cmdIsFunction = true;
|
||||
cmd = # lua
|
||||
''
|
||||
function()
|
||||
require("harpoon"):list():select(${toString num})
|
||||
end
|
||||
'';
|
||||
}) (lib.range 1 10));
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue