Flatten cargoExtraArgs away from the runnable lsp extension

This commit is contained in:
Lukas Wirth 2024-07-06 16:28:45 +02:00
parent fcddcf2ee5
commit 3d7ee9b4ea
9 changed files with 19 additions and 38 deletions

View file

@ -239,7 +239,7 @@ export type CommonRunnableArgs = {
/**
* Environment variables to set before running the command.
*/
environment: Record<string, string>;
environment?: Record<string, string>;
/**
* The working directory to run the command in.
*/
@ -257,22 +257,19 @@ export type CargoRunnableArgs = {
* The workspace root directory of the cargo project.
*/
workspaceRoot?: string;
/**
* The cargo command to run.
*/
cargoArgs: string[];
/**
* Extra arguments to pass to cargo.
*/
// What is the point of this when cargoArgs exists?
cargoExtraArgs: string[];
/**
* Arguments to pass to the executable, these will be passed to the command after a `--` argument.
*/
executableArgs: string[];
/**
* Arguments to pass to cargo.
*/
cargoArgs: string[];
/**
* Command to execute instead of `cargo`.
*/
// This is supplied by the user via config. We could pull this through the client config in the
// extension directly, but that would prevent us from honoring the rust-analyzer.toml for it.
overrideCargo?: string;
} & CommonRunnableArgs;