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.ts34
1 files changed, 29 insertions, 5 deletions
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts
index 699052e4d4..fee023bbc9 100644
--- a/editors/code/src/lsp_ext.ts
+++ b/editors/code/src/lsp_ext.ts
@@ -235,22 +235,46 @@ 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;
+ /**
+ * The cargo command to run.
+ */
cargoArgs: string[];
- cwd: 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[];
- expectTest?: boolean;
+ /**
+ * Command to execute instead of `cargo`.
+ */
overrideCargo?: string;
-};
+} & CommonRunnableArgs;
export type RunnablesParams = {
textDocument: lc.TextDocumentIdentifier;