diff --git a/lib/maintainers.nix b/lib/maintainers.nix index d11ca2fd50..3831357e44 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -124,4 +124,10 @@ githubId = 38228372; name = "Katie Janzen"; }; + samos667 = { + email = "sammyetur11@gmail.com"; + github = "samos667"; + githubId = 50653464; + name = "samos667"; + }; } diff --git a/plugins/by-name/molten/default.nix b/plugins/by-name/molten/default.nix index e7bc4da220..f3b3ef15af 100644 --- a/plugins/by-name/molten/default.nix +++ b/plugins/by-name/molten/default.nix @@ -80,9 +80,12 @@ mkVimPlugin { [ "none" "image.nvim" + "wezterm" ] '' How images are displayed. + + If set to `"wezterm"`, `plugins.wezterm.enable` must be true. ''; open_cmd = helpers.mkNullOrOption types.str '' diff --git a/plugins/by-name/wezterm/default.nix b/plugins/by-name/wezterm/default.nix new file mode 100644 index 0000000000..c28677051c --- /dev/null +++ b/plugins/by-name/wezterm/default.nix @@ -0,0 +1,39 @@ +{ + lib, + pkgs, + ... +}: +let + inherit (lib.nixvim) defaultNullOpts; +in +lib.nixvim.neovim-plugin.mkNeovimPlugin { + name = "wezterm"; + originalName = "wezterm.nvim"; + package = "wezterm-nvim"; + + 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. + ''; + }; + + settingsExample = { + create_commands = false; + }; + + extraConfig = cfg: { + extraPackages = [ + cfg.weztermPackage + ]; + }; +} diff --git a/tests/test-sources/plugins/by-name/wezterm/default.nix b/tests/test-sources/plugins/by-name/wezterm/default.nix new file mode 100644 index 0000000000..97de02c061 --- /dev/null +++ b/tests/test-sources/plugins/by-name/wezterm/default.nix @@ -0,0 +1,23 @@ +{ + empty = + { pkgs, ... }: + { + plugins.wezterm = { + enable = true; + weztermPackage = pkgs.wezterm; + }; + }; + + defaults = + { pkgs, ... }: + { + plugins.wezterm = { + enable = true; + weztermPackage = pkgs.wezterm; + + settings = { + create_commands = true; + }; + }; + }; +}