mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-15 23:17:48 +00:00
modules: start breaking down core modules; simplify tree structure
This commit is contained in:
parent
4703ed7731
commit
370913e827
242 changed files with 178 additions and 124 deletions
24
modules/plugins/utility/motion/hop/config.nix
Normal file
24
modules/plugins/utility/motion/hop/config.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
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()
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue