Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/src/lsp_ext.ts')
| -rw-r--r-- | editors/code/src/lsp_ext.ts | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts index 699052e4d4..e24893b250 100644 --- a/editors/code/src/lsp_ext.ts +++ b/editors/code/src/lsp_ext.ts @@ -235,22 +235,43 @@ type RunnableShell = { args: ShellRunnableArgs; }; +export type CommonRunnableArgs = { + /** + * Environment variables to set before running the command. + */ + environment?: Record<string, string>; + /** + * The working directory to run the command in. + */ + cwd: string; +}; + export type ShellRunnableArgs = { kind: string; program: string; args: string[]; - cwd: string; -}; +} & CommonRunnableArgs; export type CargoRunnableArgs = { + /** + * The workspace root directory of the cargo project. + */ workspaceRoot?: string; - cargoArgs: string[]; - cwd: string; - cargoExtraArgs: string[]; + /** + * Arguments to pass to the executable, these will be passed to the command after a `--` argument. + */ executableArgs: string[]; - expectTest?: boolean; + /** + * 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; export type RunnablesParams = { textDocument: lc.TextDocumentIdentifier; |