plugins/lsp: use mkPackageOption for pylsp + rust-analyzer

This commit is contained in:
Matt Sturgeon 2024-09-03 16:30:01 +01:00
parent 848246bc64
commit 37165453a9
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 6 additions and 14 deletions

View file

@ -11,10 +11,8 @@ let
in in
{ {
options.plugins.lsp.servers.pylsp = { options.plugins.lsp.servers.pylsp = {
pythonPackage = mkOption { pythonPackage = mkPackageOption pkgs "python" {
type = lib.types.package; default = "python3";
description = "Python package to use for lsp.";
default = pkgs.python3;
}; };
# All settings are documented here: # All settings are documented here:

View file

@ -18,11 +18,8 @@ in
description = "Whether to install `cargo`."; description = "Whether to install `cargo`.";
}; };
cargoPackage = mkOption { # TODO: make nullable?
type = types.package; cargoPackage = mkPackageOption pkgs "cargo" { };
default = pkgs.cargo;
description = "Which package to use for `cargo`.";
};
installRustc = mkOption { installRustc = mkOption {
type = with types; nullOr bool; type = with types; nullOr bool;
@ -31,11 +28,8 @@ in
description = "Whether to install `rustc`."; description = "Whether to install `rustc`.";
}; };
rustcPackage = mkOption { # TODO: make nullable
type = types.package; rustcPackage = mkPackageOption pkgs "rustc" { };
default = pkgs.rustc;
description = "Which package to use for `rustc`.";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
warnings = warnings =