neovim-flake/modules/utility/motion/leap/config.nix

31 lines
526 B
Nix
Raw Normal View History

2023-04-05 01:14:13 +02:00
{
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 = {}
-- }
-- }
'';
};
}