mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-22 20:43:27 +00:00
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ibfb235ddd0c8df9b193dc47cc9ffa7056a6a6964
27 lines
586 B
Nix
27 lines
586 B
Nix
{
|
|
config,
|
|
lib,
|
|
options,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf;
|
|
inherit (lib.nvim.binds) mkKeymap;
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
|
inherit (lib.nvim.lua) toLuaObject;
|
|
|
|
cfg = config.vim.utility.motion.hop;
|
|
|
|
inherit (options.vim.utility.motion.hop) mappings;
|
|
in {
|
|
config.vim = mkIf cfg.enable {
|
|
startPlugins = ["hop.nvim"];
|
|
|
|
keymaps = [
|
|
(mkKeymap "n" cfg.mappings.hop "<cmd>HopPattern<CR>" {desc = mappings.hop.description;})
|
|
];
|
|
|
|
pluginRC.hop-nvim = entryAnywhere ''
|
|
require('hop').setup(${toLuaObject cfg.setupOpts})
|
|
'';
|
|
};
|
|
}
|