diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2024-07-06 16:15:06 +0200 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2024-07-06 16:20:25 +0200 |
| commit | 0859772dbe093c7f2176fcc641bd254588a5f585 (patch) | |
| tree | 48d90db2be60a2151226e5e390932b714fda231a /src/tools/rust-analyzer/docs/dev | |
| parent | fc92ee8f24edd1b6c6116b93b8118dfb1bc400ff (diff) | |
| download | rust-0859772dbe093c7f2176fcc641bd254588a5f585.tar.gz rust-0859772dbe093c7f2176fcc641bd254588a5f585.zip | |
Add environment to runnable lsp extension
Diffstat (limited to 'src/tools/rust-analyzer/docs/dev')
| -rw-r--r-- | src/tools/rust-analyzer/docs/dev/lsp-extensions.md | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/src/tools/rust-analyzer/docs/dev/lsp-extensions.md b/src/tools/rust-analyzer/docs/dev/lsp-extensions.md index 695fec7e8e0..1cafcae7bb6 100644 --- a/src/tools/rust-analyzer/docs/dev/lsp-extensions.md +++ b/src/tools/rust-analyzer/docs/dev/lsp-extensions.md @@ -1,5 +1,5 @@ <!--- -lsp/ext.rs hash: 8e6e340f2899b5e9 +lsp/ext.rs hash: 3605fab9e66e14a0 If you need to change the above hash to make the test pass, please check if you need to adjust this doc as well and ping this issue: @@ -376,12 +376,34 @@ rust-analyzer supports two `kind`s of runnables, `"cargo"` and `"shell"`. The `a ```typescript { + /** + * Environment variables to set before running the command. + */ + environment: Record<string, string>; + /** + * The working directory to run the command in. + */ + cwd: string; + /** + * The workspace root directory of the cargo project. + */ workspaceRoot?: string; - cwd?: 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[]; - expectTest?: boolean; + /** + * Command to execute instead of `cargo`. + */ overrideCargo?: string; } ``` @@ -390,10 +412,17 @@ The args for `"shell"` look like this: ```typescript { + /** + * Environment variables to set before running the command. + */ + environment: Record<string, string>; + /** + * The working directory to run the command in. + */ + cwd: string; kind: string; program: string; args: string[]; - cwd: string; } ``` |
