mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-14 11:14:36 +02:00
plugins/lsp: add packageFallback option
https://github.com/nix-community/nixvim/pull/3445#pullrequestreview-2908615597
This commit is contained in:
parent
95957f306b
commit
46e8ba6f9f
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