2023-03-09 11:28:02 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-07 01:50:27 +01:00
|
|
|
}: let
|
|
|
|
inherit (lib) addDescriptionsToMappings mkIf mkSetBinding nvim;
|
|
|
|
|
2023-04-05 01:14:00 +02:00
|
|
|
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;
|
2023-03-09 11:28:02 +01:00
|
|
|
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>";
|
2023-03-09 11:28:02 +01:00
|
|
|
|
|
|
|
vim.luaConfigRC.hop-nvim = nvim.dag.entryAnywhere ''
|
|
|
|
require('hop').setup()
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|