mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/nerdy: init
This commit is contained in:
parent
5fca2c2dca
commit
c6ed00c902
2 changed files with 42 additions and 0 deletions
25
plugins/by-name/nerdy/default.nix
Normal file
25
plugins/by-name/nerdy/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ lib, config, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "nerdy";
|
||||
packPathName = "nerdy.nvim";
|
||||
package = "nerdy-nvim";
|
||||
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
|
||||
callSetup = false;
|
||||
hasSettings = false;
|
||||
|
||||
extraOptions = {
|
||||
enableTelescope = lib.mkEnableOption "telescope integration";
|
||||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
assertions = lib.nixvim.mkAssertions "plugins.nerdy" {
|
||||
assertion = cfg.enableTelescope -> config.plugins.telescope.enable;
|
||||
message = ''
|
||||
Telescope support (enableTelescope) is enabled but the telescope plugin is not.
|
||||
'';
|
||||
};
|
||||
plugins.telescope.enabledExtensions = lib.mkIf cfg.enableTelescope [ "nerdy" ];
|
||||
};
|
||||
}
|
17
tests/test-sources/plugins/by-name/nerdy/default.nix
Normal file
17
tests/test-sources/plugins/by-name/nerdy/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.nerdy.enable = true;
|
||||
};
|
||||
|
||||
with-telescope = {
|
||||
plugins = {
|
||||
telescope.enable = true;
|
||||
web-devicons.enable = true;
|
||||
|
||||
nerdy = {
|
||||
enable = true;
|
||||
enableTelescope = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue