Don't cache file config options until we succesfully complete a request

Fixes #58518
This commit is contained in:
Matt Bierner
2018-09-24 16:29:35 -07:00
parent 54090bc222
commit 58a72ab6cf

View File

@@ -95,12 +95,14 @@ export default class FileConfigurationManager {
return;
}
this.formatOptions.set(document.uri, currentOptions);
const args: Proto.ConfigureRequestArguments = {
file,
...currentOptions,
};
await this.client.execute('configure', args, token);
const response = await this.client.execute('configure', args, token);
if (response.type === 'response') {
this.formatOptions.set(document.uri, currentOptions);
}
}
public async setGlobalConfigurationFromDocument(