forked from jan-leila/nix-config
		
	feat: added rust-analyzer vscode package
This commit is contained in:
		
							parent
							
								
									30a042d709
								
							
						
					
					
						commit
						5114f52607
					
				
					 3 changed files with 31 additions and 0 deletions
				
			
		|  | @ -0,0 +1,27 @@ | |||
| { | ||||
|   lib, | ||||
|   pkgs, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version; | ||||
|   pkgsRepository = pkgsRepositories.open-vsx; | ||||
| in { | ||||
|   options.programs.vscode.profiles = lib.mkOption { | ||||
|     type = lib.types.attrsOf (lib.types.submodule ({config, ...}: { | ||||
|       options = { | ||||
|         extraExtensions.rustAnalyzer = { | ||||
|           enable = lib.mkEnableOption "should the rust-analyzer extension for vscode be enabled"; | ||||
|           extension = lib.mkPackageOption pkgsRepository "rust-analyzer" { | ||||
|             default = ["rust-lang" "rust-analyzer"]; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|       config = lib.mkIf config.extraExtensions.rustAnalyzer.enable { | ||||
|         extensions = [ | ||||
|           config.extraExtensions.rustAnalyzer.extension | ||||
|         ]; | ||||
|       }; | ||||
|     })); | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue