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
parent cc92d7f1b2
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

@ -141,6 +141,7 @@ inputs: let
icon-picker.enable = true;
venn-nvim.enable = false; # FIXME throws an error when its commands are ran manually
diffview-nvim.enable = true;
hop.enable = true;
};
vim.notes = {
@ -180,7 +181,7 @@ inputs: let
presence-nvim = {
enable = true;
auto_update = true;
image_text = "The One True Text Editor";
image_text = "The Superior Text Editor";
client_id = "793271441293967371";
main_image = "neovim";
rich_presence = {

View file

@ -496,6 +496,22 @@
"type": "github"
}
},
"hop-nvim": {
"flake": false,
"locked": {
"lastModified": 1667151642,
"narHash": "sha256-UZZlo5n1x8UfM9OP7RHfT3sFRfMpLkBLbEdcSO+SU6E=",
"owner": "phaazon",
"repo": "hop.nvim",
"rev": "90db1b2c61b820e230599a04fedcd2679e64bd07",
"type": "github"
},
"original": {
"owner": "phaazon",
"repo": "hop.nvim",
"type": "github"
}
},
"icon-picker-nvim": {
"flake": false,
"locked": {
@ -1262,6 +1278,7 @@
"gesture-nvim": "gesture-nvim",
"gitsigns-nvim": "gitsigns-nvim",
"glow-nvim": "glow-nvim",
"hop-nvim": "hop-nvim",
"icon-picker-nvim": "icon-picker-nvim",
"indent-blankline": "indent-blankline",
"kommentary": "kommentary",

View file

@ -10,12 +10,11 @@
systems = [
"x86_64-linux"
"aarch64-linux"
/*
FIXME: zig compiler - therefore the maximal version - is broken on darwin
see https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/zig/0.10.nix#L70
"x86_64-darwin"
"aarch64-darwin"
*/
# FIXME: zig compiler - therefore the maximal version - is broken on darwin
# see https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/zig/0.10.nix#L70
# "x86_64-darwin"
# "aarch64-darwin"
];
imports = [
@ -397,8 +396,12 @@
flake = false;
};
# Note-taking
hop-nvim = {
url = "github:phaazon/hop.nvim";
flake = false;
};
# Note-taking
obsidian-nvim = {
url = "github:epwalsh/obsidian.nvim";
flake = false;

View file

@ -73,6 +73,7 @@ with lib; let
"diffview-nvim"
"todo-comments"
"flutter-tools"
"hop-nvim"
];
# You can either use the name of the plugin or a package.
pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package));

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)";
};
};
}