Use nixvim
This commit is contained in:
parent
f0217e4640
commit
ecb2a05d60
72 changed files with 691 additions and 1664 deletions
47
modules/home-manager/coding/neovim/plugins/harpoon.nix
Normal file
47
modules/home-manager/coding/neovim/plugins/harpoon.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
leaderBinding = key: command: {
|
||||
key = "<leader>${key}";
|
||||
action = "<cmd>${command}<CR>";
|
||||
options.silent = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
plugins.harpoon = {
|
||||
enable = true;
|
||||
enableTelescope = true;
|
||||
};
|
||||
|
||||
keymaps = lib.mkIf config.plugins.harpoon.enable (
|
||||
[
|
||||
{
|
||||
key = "<leader>a";
|
||||
action.__raw = "function() require'harpoon':list():add() end";
|
||||
}
|
||||
|
||||
{
|
||||
key = "<C-e>";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require 'harpoon'.ui:toggle_quick_menu(require'harpoon':list())
|
||||
end
|
||||
'';
|
||||
}
|
||||
]
|
||||
++ (map
|
||||
(num: leaderBinding "${toString num}" "lua require(\"harpoon\"):list():select(${toString num})")
|
||||
[
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue