Skip to content

Commit 6bd1ff1

Browse files
author
Veetaha
committed
vscode: rename alwaysDownloadServer -> askBeforeDownload
The new name seems much simpler and it doesn't limit this config value only to downloading the server binary. Thus we wouldn't need to create another config properties to handle other downloads whatsoever. Anyway, I believe (heuristically) that most of the users would want to set "askBeforeDownload": false once and never bother clicking on the notification again (because otherwise there is no big point in installing rust-analyzer if it cannot install the server)
1 parent 49b4e88 commit 6bd1ff1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/user/readme.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ image::https://user-images.githubusercontent.com/9021944/75067008-17502500-54ba-
4343
> Note: to disable this notification put the following to `settings.json`
4444
> ```json
4545
{
46-
"rust-analyzer.alwaysDownloadServer": true
46+
"rust-analyzer.askBeforeDownload": false
4747
}
4848
```
4949

editors/code/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@
219219
}
220220
}
221221
},
222-
"rust-analyzer.alwaysDownloadServer": {
222+
"rust-analyzer.askBeforeDownload": {
223223
"type": "boolean",
224-
"default": false,
225-
"description": "Whether to ask before downloading the language server binary"
224+
"default": true,
225+
"description": "Whether to ask for permission before downloading any files from the Internet"
226226
},
227227
"rust-analyzer.serverPath": {
228228
"type": [

editors/code/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class Config {
134134
file: prebuiltBinaryName,
135135
storage: this.ctx.globalState,
136136
tag: Config.extensionVersion,
137-
askBeforeDownload: !(this.cfg.get("alwaysDownloadServer") as boolean),
137+
askBeforeDownload: !(this.cfg.get("askBeforeDownload") as boolean),
138138
repo: {
139139
name: "rust-analyzer",
140140
owner: "rust-analyzer",

0 commit comments

Comments
 (0)