mirror of
https://github.com/nix-community/nixvim.git
synced 2025-12-15 13:31:09 +01:00
plugins/lsp: add packageFallback option
https://github.com/nix-community/nixvim/pull/3445#pullrequestreview-2908615597
This commit is contained in:
parent
ee715541ab
commit
6a054de04d
4 changed files with 77 additions and 6 deletions
|
|
@ -9,6 +9,11 @@ let
|
|||
inherit (lib) mkPackageOption types;
|
||||
inherit (lib.nixvim) mkNullOrOption';
|
||||
|
||||
extraPackages =
|
||||
lib.optional (cfg.installCargo == true) cfg.cargoPackage
|
||||
++ lib.optional (cfg.installRustc == true) cfg.rustcPackage
|
||||
++ lib.optional (cfg.installRustfmt == true) cfg.rustfmtPackage;
|
||||
|
||||
in
|
||||
{
|
||||
options.plugins.lsp.servers.rust_analyzer = {
|
||||
|
|
@ -72,9 +77,7 @@ in
|
|||
}
|
||||
];
|
||||
|
||||
extraPackages =
|
||||
lib.optional (cfg.installCargo == true) cfg.cargoPackage
|
||||
++ lib.optional (cfg.installRustc == true) cfg.rustcPackage
|
||||
++ lib.optional (cfg.installRustfmt == true) cfg.rustfmtPackage;
|
||||
extraPackages = lib.optionals (!cfg.packageFallback) extraPackages;
|
||||
extraPackagesAfter = lib.optionals cfg.packageFallback extraPackages;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue