mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-07 16:05:58 +01: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;
|
icon-picker.enable = true;
|
||||||
venn-nvim.enable = false; # FIXME throws an error when its commands are ran manually
|
venn-nvim.enable = false; # FIXME throws an error when its commands are ran manually
|
||||||
diffview-nvim.enable = true;
|
diffview-nvim.enable = true;
|
||||||
|
hop.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
vim.notes = {
|
vim.notes = {
|
||||||
|
@ -180,7 +181,7 @@ inputs: let
|
||||||
presence-nvim = {
|
presence-nvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
auto_update = true;
|
auto_update = true;
|
||||||
image_text = "The One True Text Editor";
|
image_text = "The Superior Text Editor";
|
||||||
client_id = "793271441293967371";
|
client_id = "793271441293967371";
|
||||||
main_image = "neovim";
|
main_image = "neovim";
|
||||||
rich_presence = {
|
rich_presence = {
|
||||||
|
|
17
flake.lock
17
flake.lock
|
@ -496,6 +496,22 @@
|
||||||
"type": "github"
|
"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": {
|
"icon-picker-nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -1262,6 +1278,7 @@
|
||||||
"gesture-nvim": "gesture-nvim",
|
"gesture-nvim": "gesture-nvim",
|
||||||
"gitsigns-nvim": "gitsigns-nvim",
|
"gitsigns-nvim": "gitsigns-nvim",
|
||||||
"glow-nvim": "glow-nvim",
|
"glow-nvim": "glow-nvim",
|
||||||
|
"hop-nvim": "hop-nvim",
|
||||||
"icon-picker-nvim": "icon-picker-nvim",
|
"icon-picker-nvim": "icon-picker-nvim",
|
||||||
"indent-blankline": "indent-blankline",
|
"indent-blankline": "indent-blankline",
|
||||||
"kommentary": "kommentary",
|
"kommentary": "kommentary",
|
||||||
|
|
17
flake.nix
17
flake.nix
|
@ -10,12 +10,11 @@
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
/*
|
|
||||||
FIXME: zig compiler - therefore the maximal version - is broken on 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
|
# see https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/zig/0.10.nix#L70
|
||||||
"x86_64-darwin"
|
# "x86_64-darwin"
|
||||||
"aarch64-darwin"
|
# "aarch64-darwin"
|
||||||
*/
|
|
||||||
];
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -397,8 +396,12 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Note-taking
|
hop-nvim = {
|
||||||
|
url = "github:phaazon/hop.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Note-taking
|
||||||
obsidian-nvim = {
|
obsidian-nvim = {
|
||||||
url = "github:epwalsh/obsidian.nvim";
|
url = "github:epwalsh/obsidian.nvim";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
|
|
@ -73,6 +73,7 @@ with lib; let
|
||||||
"diffview-nvim"
|
"diffview-nvim"
|
||||||
"todo-comments"
|
"todo-comments"
|
||||||
"flutter-tools"
|
"flutter-tools"
|
||||||
|
"hop-nvim"
|
||||||
];
|
];
|
||||||
# You can either use the name of the plugin or a package.
|
# You can either use the name of the plugin or a package.
|
||||||
pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package));
|
pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package));
|
||||||
|
|
|
@ -8,5 +8,6 @@ _: {
|
||||||
./telescope
|
./telescope
|
||||||
./venn
|
./venn
|
||||||
./diffview
|
./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