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.ts36
1 files changed, 27 insertions, 9 deletions
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts
index 8e48aeef15..699052e4d4 100644
--- a/editors/code/src/lsp_ext.ts
+++ b/editors/code/src/lsp_ext.ts
@@ -223,17 +223,35 @@ export type OpenCargoTomlParams = {
export type Runnable = {
label: string;
location?: lc.LocationLink;
+} & (RunnableCargo | RunnableShell);
+
+type RunnableCargo = {
kind: "cargo";
- args: {
- workspaceRoot?: string;
- cwd?: string;
- cargoArgs: string[];
- cargoExtraArgs: string[];
- executableArgs: string[];
- expectTest?: boolean;
- overrideCargo?: string;
- };
+ args: CargoRunnableArgs;
+};
+
+type RunnableShell = {
+ kind: "shell";
+ args: ShellRunnableArgs;
+};
+
+export type ShellRunnableArgs = {
+ kind: string;
+ program: string;
+ args: string[];
+ cwd: string;
+};
+
+export type CargoRunnableArgs = {
+ workspaceRoot?: string;
+ cargoArgs: string[];
+ cwd: string;
+ cargoExtraArgs: string[];
+ executableArgs: string[];
+ expectTest?: boolean;
+ overrideCargo?: string;
};
+
export type RunnablesParams = {
textDocument: lc.TextDocumentIdentifier;
position: lc.Position | null;