Skip to content

Commit

Permalink
fixup! plugins/wezterm: init
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Dec 9, 2024
1 parent e1c0570 commit d4053a1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 10 deletions.
20 changes: 19 additions & 1 deletion plugins/by-name/wezterm/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{ lib, ... }:
{
lib,
pkgs,
...
}:
let
inherit (lib.nixvim) defaultNullOpts;
in
Expand All @@ -9,6 +13,14 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {

maintainers = [ lib.maintainers.samos667 ];

extraOptions = {
weztermPackage = lib.mkPackageOption pkgs "wezterm" {
nullable = true;
default = null;
example = [ "wezterm" ];
};
};

settingsOptions = {
create_commands = defaultNullOpts.mkBool true ''
Whether to create plugin commands.
Expand All @@ -18,4 +30,10 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
settingsExample = {
create_commands = false;
};

extraConfig = cfg: {
extraPackages = [
cfg.weztermPackage
];
};
}
26 changes: 17 additions & 9 deletions tests/test-sources/plugins/by-name/wezterm/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
{
empty = {
plugins.wezterm.enable = true;
};
empty =
{ pkgs, ... }:
{
plugins.wezterm = {
enable = true;
package = pkgs.wezterm;
};
};

defaults = {
plugins.wezterm = {
enable = true;
defaults =
{ pkgs, ... }:
{
plugins.wezterm = {
enable = true;
package = pkgs.wezterm;

settings = {
create_commands = true;
settings = {
create_commands = true;
};
};
};
};
}

0 comments on commit d4053a1

Please sign in to comment.