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
{
options.plugins.lsp.servers.pylsp = {
pythonPackage = mkOption {
type = lib.types.package;
description = "Python package to use for lsp.";
default = pkgs.python3;
pythonPackage = mkPackageOption pkgs "python" {
default = "python3";
};
# All settings are documented here:

View file

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