mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-05 18:01:32 +00:00
feat: add leap.nvim
This commit is contained in:
parent
b76eb174f1
commit
d6cb8d9aba
9 changed files with 108 additions and 2 deletions
|
@ -2,12 +2,12 @@ _: {
|
|||
imports = [
|
||||
./binds
|
||||
./gestures
|
||||
./motion
|
||||
./telescope
|
||||
./colorizer
|
||||
./icon-picker
|
||||
./telescope
|
||||
./venn
|
||||
./diffview
|
||||
./hop
|
||||
];
|
||||
}
|
||||
|
|
6
modules/utility/motion/default.nix
Normal file
6
modules/utility/motion/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./hop
|
||||
./leap
|
||||
];
|
||||
}
|
30
modules/utility/motion/leap/config.nix
Normal file
30
modules/utility/motion/leap/config.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.vim.utility.motion.leap;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
"leap-nvim"
|
||||
"vim-repeat"
|
||||
];
|
||||
|
||||
vim.nnoremap = {
|
||||
"<leader>h" = "<cmd> HopPattern<CR>";
|
||||
};
|
||||
|
||||
vim.luaConfigRC.leap-nvim = nvim.dag.entryAnywhere ''
|
||||
require('leap').add_default_mappings()
|
||||
-- TODO: register custom keybinds
|
||||
-- require('leap').leap {
|
||||
-- opts = {
|
||||
-- labels = {}
|
||||
-- }
|
||||
-- }
|
||||
'';
|
||||
};
|
||||
}
|
8
modules/utility/motion/leap/default.nix
Normal file
8
modules/utility/motion/leap/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
_: {
|
||||
imports = [
|
||||
./leap.nix
|
||||
./config.nix
|
||||
];
|
||||
|
||||
|
||||
}
|
13
modules/utility/motion/leap/leap.nix
Normal file
13
modules/utility/motion/leap/leap.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.vim.utility.motion.leap;
|
||||
in {
|
||||
options.vim.utility.motion.leap = {
|
||||
enable = mkEnableOption "Enable leap.nvim plugin (easy motion)";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue