You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This request is send from client to server to get the list of things that can be run (tests, binaries, `cargo check -p`).
321
+
322
+
**Method:**`experimental/runnables`
323
+
324
+
**Request:**
325
+
326
+
```typescript
327
+
interfaceRunnablesParams {
328
+
textDocument:TextDocumentIdentifier;
329
+
/// If null, compute runnables for the whole file.
330
+
position?:Position;
331
+
}
332
+
```
333
+
334
+
**Response:**`Runnable[]`
335
+
336
+
```typescript
337
+
interfaceRunnable {
338
+
label:string;
339
+
/// If this Runnable is associated with a specific function/module, etc, the location of this item
340
+
location?:LocationLink;
341
+
/// Running things is necessary technology specific, `kind` needs to be advertised via server capabilities,
342
+
// the type of `args` is specific to `kind`. The actual running is handled by the client.
343
+
kind:string;
344
+
args:any;
345
+
}
346
+
```
347
+
348
+
rust-analyzer supports only one `kind`, `"cargo"`. The `args` for `"cargo"` look like this:
349
+
350
+
```typescript
351
+
{
352
+
workspaceRoot?:string;
353
+
cargoArgs: string[];
354
+
executableArgs: string[];
355
+
}
356
+
```
357
+
314
358
## Analyzer Status
315
359
316
360
**Method:**`rust-analyzer/analyzerStatus`
@@ -399,39 +443,3 @@ interface InlayHint {
399
443
label:string,
400
444
}
401
445
```
402
-
403
-
## Runnables
404
-
405
-
**Method:**`rust-analyzer/runnables`
406
-
407
-
This request is send from client to server to get the list of things that can be run (tests, binaries, `cargo check -p`).
408
-
Note that we plan to move this request to `experimental/runnables`, as it is not really Rust-specific, but the current API is not necessary the right one.
0 commit comments