mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-01 19:11:15 +00:00
25 lines
569 B
Nix
25 lines
569 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib) addDescriptionsToMappings mkIf mkSetBinding nvim;
|
|
|
|
cfg = config.vim.utility.motion.hop;
|
|
|
|
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"];
|
|
|
|
vim.maps.normal = mkSetBinding mappings.hop "<cmd> HopPattern<CR>";
|
|
|
|
vim.luaConfigRC.hop-nvim = nvim.dag.entryAnywhere ''
|
|
require('hop').setup()
|
|
'';
|
|
};
|
|
}
|