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");
115
+
message.push_str("Failed to discover workspace.\n");
116
+
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
@@ -444,6 +444,11 @@
444
444
"type": "string"
445
445
}
446
446
},
447
+
"rust-analyzer.showUnlinkedFileNotification": {
448
+
"markdownDescription": "Whether to show a notification for unlinked files asking the user to add the corresponding Cargo.toml to the linked projects setting.",
449
+
"default": true,
450
+
"type": "boolean"
451
+
},
447
452
"$generated-start": {},
448
453
"rust-analyzer.assist.emitMustUse": {
449
454
"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?`,
147
+
"Yes",
148
+
"No",
149
+
"Don't show this again"
150
+
)
151
+
.then((choice)=>{
152
+
switch(choice){
153
+
case"Yes":
154
+
break;
155
+
case"No":
156
+
config.update(
157
+
"linkedProjects",
158
+
config
159
+
.get<any[]>("linkedProjects")
160
+
?.concat(
161
+
path.fsPath.substring(
162
+
folder!.length
163
+
)
164
+
),
165
+
false
166
+
);
167
+
break;
168
+
case"Don't show this again":
169
+
config.update(
170
+
"showUnlinkedFileNotification",
171
+
false,
172
+
false
173
+
);
174
+
break;
175
+
}
176
+
});
177
+
});
178
+
}
179
+
}
180
+
}
181
+
}
182
+
122
183
// Abuse the fact that VSCode leaks the LSP diagnostics data field through the
123
184
// Diagnostic class, if they ever break this we are out of luck and have to go
124
185
// back to the worst diagnostics experience ever:)
@@ -138,22 +199,15 @@ export async function createClient(
0 commit comments