Don't make r-a fail to initialize if updating the config fails

This commit is contained in:
Lukas Wirth 2022-05-13 21:20:37 +02:00
parent 8ac429dad9
commit 8496633c87

View file

@ -49,7 +49,9 @@ export async function createClient(serverPath: string, workspace: Workspace, ext
let initializationOptions = vscode.workspace.getConfiguration("rust-analyzer");
// Update outdated user configs
await updateConfig(initializationOptions);
await updateConfig(initializationOptions).catch(err => {
void vscode.window.showErrorMessage(`Failed updating old config keys: ${err.message}`);
});
if (workspace.kind === "Detached Files") {
initializationOptions = { "detachedFiles": workspace.files.map(file => file.uri.fsPath), ...initializationOptions };