-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal: Clean up runnable lsp extension #17547
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<!--- | ||
lsp/ext.rs hash: 8e6e340f2899b5e9 | ||
lsp/ext.rs hash: a0867710490bf8da | ||
|
||
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,29 @@ 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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like this being mandatory gives a more unique experience across clients. We should not leave this decision to clients as that could result in runnables sometimes working sometimes not. (notable it is required by the shell version already) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, reducing the number of possible options is great. the combinatorial explosion of options made this really difficult to reason about. |
||
/** | ||
* The workspace root directory of the cargo project. | ||
*/ | ||
workspaceRoot?: string; | ||
cwd?: string; | ||
/** | ||
* The cargo command to run. | ||
*/ | ||
cargoArgs: string[]; | ||
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 +407,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; | ||
} | ||
``` | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open to alternative names, should we be explicit with
environmentVariables
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could also call it
envVariables
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, I'll stick with
environment
I think.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough! not terribly attached.