mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +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
|
@ -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 = {
|
||||
|
|
17
flake.lock
17
flake.lock
|
@ -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",
|
||||
|
|
17
flake.nix
17
flake.nix
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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…
Reference in a new issue