Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit 0388a39

Browse files
committed
Update deprecation config key
1 parent 95e89e7 commit 0388a39

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@
486486
"default": null,
487487
"description": "When specified, uses the rust-analyzer binary at a given path"
488488
},
489-
"rust-client.ignoreDeprecationWarning": {
489+
"rust.ignore_deprecation_warning": {
490490
"type": "boolean",
491491
"default": false,
492492
"description": "Whether to surpress the deprecation notification on start up."

src/extension.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,20 @@ export interface Api {
3232
}
3333

3434
export async function activate(context: ExtensionContext): Promise<Api> {
35+
context.subscriptions.push(
36+
...[
37+
configureLanguage(),
38+
...registerCommands(),
39+
workspace.onDidChangeWorkspaceFolders(whenChangingWorkspaceFolders),
40+
window.onDidChangeActiveTextEditor(onDidChangeActiveTextEditor),
41+
],
42+
);
43+
// Manually trigger the first event to start up server instance if necessary,
44+
// since VSCode doesn't do that on startup by itself.
45+
onDidChangeActiveTextEditor(window.activeTextEditor);
46+
3547
const config = workspace.getConfiguration();
36-
if (!config.get<boolean>('rust-client.ignoreDeprecationWarning', false)) {
48+
if (!config.get<boolean>('rust.ignore_deprecation_warning', false)) {
3749
window
3850
.showWarningMessage(
3951
'rust-lang.rust has been deprecated. Please uninstall this extension and install rust-lang.rust-analyzer instead. You can find the extension by clicking on one of the buttons',
@@ -45,7 +57,7 @@ export async function activate(context: ExtensionContext): Promise<Api> {
4557
switch (button) {
4658
case 'Disable Warning':
4759
config.update(
48-
'rust-client.ignoreDeprecationWarning',
60+
'rust.ignore_deprecation_warning',
4961
true,
5062
ConfigurationTarget.Global,
5163
);
@@ -69,18 +81,6 @@ export async function activate(context: ExtensionContext): Promise<Api> {
6981
});
7082
}
7183

72-
context.subscriptions.push(
73-
...[
74-
configureLanguage(),
75-
...registerCommands(),
76-
workspace.onDidChangeWorkspaceFolders(whenChangingWorkspaceFolders),
77-
window.onDidChangeActiveTextEditor(onDidChangeActiveTextEditor),
78-
],
79-
);
80-
// Manually trigger the first event to start up server instance if necessary,
81-
// since VSCode doesn't do that on startup by itself.
82-
onDidChangeActiveTextEditor(window.activeTextEditor);
83-
8484
// Migrate the users of multi-project setup for RLS to disable the setting
8585
// entirely (it's always on now)
8686
if (

0 commit comments

Comments
 (0)