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

25 lines
569 B
Nix
Raw Normal View History

{
config,
lib,
...
}: let
inherit (lib) addDescriptionsToMappings mkIf mkSetBinding nvim;
cfg = config.vim.utility.motion.hop;
2023-05-02 21:58:06 +02:00
self = import ./hop.nix {inherit lib;};
mappingDefinitions = self.options.vim.utility.motion.hop.mappings;
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
in {
config = mkIf cfg.enable {
vim.startPlugins = ["hop-nvim"];
2023-05-02 21:58:06 +02:00
vim.maps.normal = mkSetBinding mappings.hop "<cmd> HopPattern<CR>";
vim.luaConfigRC.hop-nvim = nvim.dag.entryAnywhere ''
require('hop').setup()
'';
};
}