mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 10:59:49 +01:00
feat: add leap.nvim
This commit is contained in:
parent
b76eb174f1
commit
d6cb8d9aba
9 changed files with 108 additions and 2 deletions
|
@ -141,7 +141,10 @@ inputs: let
|
|||
icon-picker.enable = true;
|
||||
venn-nvim.enable = false; # FIXME throws an error when its commands are ran manually
|
||||
diffview-nvim.enable = true;
|
||||
motion = {
|
||||
hop.enable = true;
|
||||
leap.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
vim.notes = {
|
||||
|
|
34
flake.lock
34
flake.lock
|
@ -560,6 +560,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"leap-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1678823512,
|
||||
"narHash": "sha256-bzmsib8Qr2Whu1FqHzvrsIfSKf/CFutsaM3Sz8gaTLo=",
|
||||
"owner": "ggandor",
|
||||
"repo": "leap.nvim",
|
||||
"rev": "f74473d23ebf60957e0db3ff8172349a82e5a442",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ggandor",
|
||||
"repo": "leap.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lsp-signature": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -1298,6 +1314,7 @@
|
|||
"icon-picker-nvim": "icon-picker-nvim",
|
||||
"indent-blankline": "indent-blankline",
|
||||
"kommentary": "kommentary",
|
||||
"leap-nvim": "leap-nvim",
|
||||
"lsp-signature": "lsp-signature",
|
||||
"lspkind": "lspkind",
|
||||
"lspsaga": "lspsaga",
|
||||
|
@ -1346,6 +1363,7 @@
|
|||
"trouble": "trouble",
|
||||
"venn-nvim": "venn-nvim",
|
||||
"vim-markdown": "vim-markdown",
|
||||
"vim-repeat": "vim-repeat",
|
||||
"vim-startify": "vim-startify",
|
||||
"vim-vsnip": "vim-vsnip",
|
||||
"which-key": "which-key",
|
||||
|
@ -1641,6 +1659,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"vim-repeat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1611544268,
|
||||
"narHash": "sha256-8rfZa3uKXB3TRCqaDHZ6DfzNbm7WaYnLvmTNzYtnKHg=",
|
||||
"owner": "tpope",
|
||||
"repo": "vim-repeat",
|
||||
"rev": "24afe922e6a05891756ecf331f39a1f6743d3d5a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tpope",
|
||||
"repo": "vim-repeat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"vim-startify": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
|
10
flake.nix
10
flake.nix
|
@ -401,6 +401,11 @@
|
|||
flake = false;
|
||||
};
|
||||
|
||||
leap-nvim = {
|
||||
url = "github:ggandor/leap.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Note-taking
|
||||
obsidian-nvim = {
|
||||
url = "github:epwalsh/obsidian.nvim";
|
||||
|
@ -476,5 +481,10 @@
|
|||
url = "github:MunifTanjim/nui.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
vim-repeat = {
|
||||
url = "github:tpope/vim-repeat";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -74,7 +74,9 @@ with lib; let
|
|||
"todo-comments"
|
||||
"flutter-tools"
|
||||
"hop-nvim"
|
||||
"leap-nvim"
|
||||
"modes-nvim"
|
||||
"vim-repeat"
|
||||
];
|
||||
# You can either use the name of the plugin or a package.
|
||||
pluginsType = with types;
|
||||
|
|
|
@ -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…
Reference in a new issue