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