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
message.push_str("Failed to discover workspace.\n\n");
123
+
message.push_str("Failed to discover workspace.\n");
124
+
message.push_str("Consider adding the `Cargo.toml` of the workspace to the [`linkedProjects`](https://rust-analyzer.github.io/manual.html#rust-analyzer.linkedProjects) setting.\n\n");
Copy file name to clipboardExpand all lines: editors/code/package.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -449,6 +449,11 @@
449
449
"type": "string"
450
450
}
451
451
},
452
+
"rust-analyzer.showUnlinkedFileNotification": {
453
+
"markdownDescription": "Whether to show a notification for unlinked files asking the user to add the corresponding Cargo.toml to the linked projects setting.",
454
+
"default": true,
455
+
"type": "boolean"
456
+
},
452
457
"$generated-start": {},
453
458
"rust-analyzer.assist.emitMustUse": {
454
459
"markdownDescription": "Whether to insert #[must_use] when generating `as_` methods\nfor enum variants.",
`This rust file does not belong to a loaded cargo project. It looks like it might belong to the workspace at ${path}, do you want to add it to the linked Projects?`,
146
+
"Yes",
147
+
"No",
148
+
"Don't show this again"
149
+
);
150
+
switch(choice){
151
+
case"Yes":
152
+
break;
153
+
case"No":
154
+
awaitconfig.update(
155
+
"linkedProjects",
156
+
config
157
+
.get<any[]>("linkedProjects")
158
+
?.concat(
159
+
path.fsPath.substring(folder.length)
160
+
),
161
+
false
162
+
);
163
+
break;
164
+
case"Don't show this again":
165
+
awaitconfig.update(
166
+
"showUnlinkedFileNotification",
167
+
false,
168
+
false
169
+
);
170
+
break;
171
+
}
172
+
});
173
+
}
174
+
}
175
+
}
176
+
}
177
+
122
178
// Abuse the fact that VSCode leaks the LSP diagnostics data field through the
123
179
// Diagnostic class, if they ever break this we are out of luck and have to go
124
180
// back to the worst diagnostics experience ever:)
@@ -138,22 +194,15 @@ export async function createClient(
0 commit comments