nvf/modules/plugins/utility/motion/hop/config.nix

27 lines
631 B
Nix
Raw Permalink Normal View History

{
config,
lib,
...
}: let
2024-03-24 00:14:39 +00:00
inherit (lib.modules) mkIf;
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding;
inherit (lib.nvim.dag) entryAnywhere;
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;
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>";
2024-03-24 00:14:39 +00:00
vim.luaConfigRC.hop-nvim = entryAnywhere ''
require('hop').setup()
'';
};
}