mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
plugins/rust-tools: Allow null serverPackage (#845)
Some users might want to use rust-analyzer beta/nightly from their own nix develop shell.
This commit is contained in:
parent
c11158c73e
commit
b140981d65
1 changed files with 3 additions and 3 deletions
|
@ -14,9 +14,9 @@ in {
|
|||
enable = mkEnableOption "rust tools plugins";
|
||||
package = helpers.mkPackageOption "rust-tools" pkgs.vimPlugins.rust-tools-nvim;
|
||||
serverPackage = mkOption {
|
||||
type = types.package;
|
||||
type = with types; nullOr package;
|
||||
default = pkgs.rust-analyzer;
|
||||
description = "Package to use for rust-analyzer";
|
||||
description = "Package to use for rust-analyzer. rust-analyzer will not be installed if this is set to `null`";
|
||||
};
|
||||
|
||||
executor =
|
||||
|
@ -133,7 +133,7 @@ in {
|
|||
};
|
||||
config = mkIf cfg.enable {
|
||||
extraPlugins = with pkgs.vimPlugins; [nvim-lspconfig cfg.package];
|
||||
extraPackages = [cfg.serverPackage];
|
||||
extraPackages = optional (cfg.serverPackage != null) cfg.serverPackage;
|
||||
|
||||
plugins.lsp.postConfig = let
|
||||
options =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue