feat: add hop.nvim

modified:   lib/types/plugins.nix
	modified:   modules/utility/default.nix
	new file:   modules/utility/hop/config.nix
	new file:   modules/utility/hop/default.nix
	new file:   modules/utility/hop/hop.nix
This commit is contained in:
NotAShelf 2023-03-09 13:28:02 +03:00
commit 562230a625
No known key found for this signature in database
GPG key ID: 05A3BD53FEB32B81
8 changed files with 74 additions and 8 deletions

View file

@ -8,5 +8,6 @@ _: {
./telescope
./venn
./diffview
./hop
];
}

View file

@ -0,0 +1,21 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.vim.utility.hop;
in {
config = mkIf cfg.enable {
vim.startPlugins = ["hop-nvim"];
vim.nnoremap = {
"<leader>h" = "<cmd> HopPattern<CR>";
};
vim.luaConfigRC.hop-nvim = nvim.dag.entryAnywhere ''
require('hop').setup()
'';
};
}

View file

@ -0,0 +1,6 @@
_: {
imports = [
./hop.nix
./config.nix
];
}

View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.vim.utility.hop;
in {
options.vim.utility.hop = {
enable = mkOption {
type = types.bool;
description = "Enable Hop plugin (easy motion)";
};
};
}