mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-05 18:01:32 +00:00
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:
parent
cc92d7f1b2
commit
562230a625
8 changed files with 74 additions and 8 deletions
|
@ -8,5 +8,6 @@ _: {
|
|||
./telescope
|
||||
./venn
|
||||
./diffview
|
||||
./hop
|
||||
];
|
||||
}
|
||||
|
|
21
modules/utility/hop/config.nix
Normal file
21
modules/utility/hop/config.nix
Normal 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()
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/utility/hop/default.nix
Normal file
6
modules/utility/hop/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./hop.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
16
modules/utility/hop/hop.nix
Normal file
16
modules/utility/hop/hop.nix
Normal 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)";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue