-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugins/wezterm: init #2597
plugins/wezterm: init #2597
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,4 +124,10 @@ | |
githubId = 38228372; | ||
name = "Katie Janzen"; | ||
}; | ||
samos667 = { | ||
email = "[email protected]"; | ||
github = "samos667"; | ||
githubId = 50653464; | ||
name = "samos667"; | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -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"; | ||||||||||||||||||
MattSturgeon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
|
||||||||||||||||||
maintainers = [ lib.maintainers.samos667 ]; | ||||||||||||||||||
|
||||||||||||||||||
extraOptions = { | ||||||||||||||||||
weztermPackage = lib.mkPackageOption pkgs "wezterm" { | ||||||||||||||||||
nullable = true; | ||||||||||||||||||
default = null; | ||||||||||||||||||
example = [ "wezterm" ]; | ||||||||||||||||||
}; | ||||||||||||||||||
Comment on lines
+17
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the best default here? The package or null? I'm assuming most users who enable this plugin will already have wezterm installed 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Usually we set the package. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would achieve that:
Suggested change
Is there any reason not to do that here? |
||||||||||||||||||
}; | ||||||||||||||||||
|
||||||||||||||||||
settingsOptions = { | ||||||||||||||||||
create_commands = defaultNullOpts.mkBool true '' | ||||||||||||||||||
Whether to create plugin commands. | ||||||||||||||||||
''; | ||||||||||||||||||
}; | ||||||||||||||||||
|
||||||||||||||||||
settingsExample = { | ||||||||||||||||||
create_commands = false; | ||||||||||||||||||
}; | ||||||||||||||||||
|
||||||||||||||||||
extraConfig = cfg: { | ||||||||||||||||||
extraPackages = [ | ||||||||||||||||||
cfg.weztermPackage | ||||||||||||||||||
]; | ||||||||||||||||||
}; | ||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
}; | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not adding a warning to check this ? This is usually what we do.