2023-03-09 11:28:02 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-07 01:50:27 +01:00
|
|
|
}: let
|
2024-03-24 01:14:39 +01:00
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding;
|
|
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
2023-11-07 01:50:27 +01:00
|
|
|
|
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
|
|
|
|
2024-07-15 12:40:05 +02:00
|
|
|
vim.pluginRC.hop-nvim = entryAnywhere ''
|
2023-03-09 11:28:02 +01:00
|
|
|
require('hop').setup()
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|