Compare commits

...
Author SHA1 Message Date
Sean McManus fa4d7b22c1 Update package.json version. (#3948) 2019-07-19 12:33:53 -07:00
Colen Garoutte-Carson 3cb7f7e61f Merge pull request #3946 from microsoft/coleng/CherryPickAgain
Cherry pick into release for 0.24.1
2019-07-18 18:54:51 -07:00
Colen Garoutte-Carson 779f2ce2b5 Fix issue with didClose received after didOpen (#3844) 2019-07-18 18:42:51 -07:00
Colen Garoutte-Carson 0c4c83e5bd Improve scope names used by Enhanced Colorization (#3896) 2019-07-18 18:42:46 -07:00
Colen Garoutte-Carson a369ede8d9 Update changelog for 0.24.1 release (#3945) 2019-07-18 18:42:40 -07:00
Colen Garoutte-Carson 36ce8f885f Revert "cherry pick fixes for 0.24.1 (#3943)"
This reverts commit 347794b0c7.
2019-07-18 18:37:18 -07:00
Colen Garoutte-Carson 347794b0c7 cherry pick fixes for 0.24.1 (#3943) 2019-07-18 17:28:00 -07:00
Sean McManus 3ed087134c Merge pull request #3869 from microsoft/seanmcm/0_24_0_release
Seanmcm/0 24 0 release
2019-07-02 19:04:05 -07:00
Sean McManus 902355e021 Merge branch 'release' into seanmcm/0_24_0_release 2019-07-02 18:36:53 -07:00
Sean McManus 32e98912df Change version 2019-07-02 18:33:53 -07:00
Sean McManus 084a8e708c Merge pull request #3630 from microsoft/0_23_1_release
0 23 1 release
2019-05-10 15:57:24 -07:00
Sean McManus 045d50bb90 Merge branch 'release' into 0_23_1_release 2019-05-10 15:17:20 -07:00
Sean McManus 68eda19665 Update version. 2019-05-10 15:14:16 -07:00
Sean McManus 39ab866a10 Merge pull request #3595 from microsoft/seanmcm/0_23_0_release
Seanmcm/0 23 0 release
2019-05-06 18:47:28 -07:00
Sean McManus d4cdfe6994 Merge branch 'release' into seanmcm/0_23_0_release 2019-05-06 18:42:11 -07:00
Sean McManus c18592b5a3 Merge pull request #3332 from Microsoft/0_22_1_release
0 22 1 release
2019-03-20 19:06:23 -07:00
Sean McManus fee924b374 Merge branch 'release' into 0_22_1_release 2019-03-20 18:46:03 -07:00
Sean McManus 6724e13c63 Update for 0.22.1. 2019-03-20 18:44:44 -07:00
Sean McManus 717de54b06 Merge pull request #3321 from Microsoft/0_22_0_release
0 22 0 release
2019-03-19 16:52:44 -07:00
Sean McManus 51cd214f1e Merge branch 'release' into 0_22_0_release 2019-03-19 16:40:15 -07:00
Sean McManus da277c8593 Seanmcm/0 21 0 release2 (#3070)
* Update yauzl version and changelog date. (#3069)
2019-01-22 19:17:42 -08:00
Bob Brown b3cce807bb Merge pull request #3068 from Microsoft/seanmcm/0_21_0_release 2019-01-22 14:43:34 -08:00
Sean McManus a533eb9a43 Merge branch 'release' into seanmcm/0_21_0_release 2019-01-22 14:32:57 -08:00
Sean McManus 9702eae953 Update package.json. 2019-01-22 14:32:04 -08:00
Sean McManus a4b51997ff Update version. 2019-01-22 14:30:32 -08:00
Sean McManus b1274d3c76 Merge pull request #2749 from Microsoft/seanmcm/0_20_1_release
Seanmcm/0 20 1 release
2018-10-31 17:24:43 -07:00
Sean McManus 8f8565dbfd Merge branch 'seanmcm/0_20_1_release' of https://github.com/Microsoft/vscode-cpptools into seanmcm/0_20_1_release 2018-10-31 17:16:30 -07:00
Sean McManus 7f4614c31c Merge again. 2018-10-31 17:15:52 -07:00
Sean McManus e231453778 Merge branch 'release' into seanmcm/0_20_1_release 2018-10-31 16:29:33 -07:00
Sean McManus 8729804dc2 Update version. 2018-10-31 16:27:42 -07:00
Sean McManus 0cf237c839 Merge pull request #2725 from Microsoft/master
2nd merge for 0.20.0
2018-10-25 16:46:17 -07:00
Bob Brown ddc1f901c2 Merge pull request #2721 from Microsoft/seanmcm/0_20_0_release
Seanmcm/0 20 0 release
2018-10-25 16:21:08 -07:00
Sean McManus 9ca27af2df Merge. 2018-10-25 15:58:34 -07:00
Sean McManus 082435ec8b Fix comment for intelliSenseEngine setting. 2018-10-25 15:48:28 -07:00
Sean McManus 324c5f59f4 Update changelog for 0.20.0 release. 2018-10-25 15:38:26 -07:00
8 changed files with 162 additions and 138 deletions
+39 -39
View File
@@ -19,32 +19,32 @@ Colors are associated with [TextMate scopes](https://macromates.com/manual/en/la
| Token | Scope |
| ------------- |:-------------:|
| Class Template | entity.name.class.template |
| Class Template | entity.name.type.class.templated |
| Enumerator | variable.other.enummember |
| Event (C++/CLI) | variable.other.event |
| Function | entity.name.function |
| Function Template | entity.name.function.template |
| Generic Type (C++/CLI) | entity.name.class.generic |
| Function Template | entity.name.function.templated |
| Generic Type (C++/CLI) | entity.name.type.class.generic |
| Global Variable | variable.other.global |
| Label | entity.name.label |
| Local Variable | variable.other.local |
| Macro | entity.name.function.preprocessor |
| Member Field | variable.other.member |
| Member Field | variable.other.property |
| Member Function | entity.name.function.member |
| Member Operator | keyword.operator.member |
| Namespace | entity.name.type.namespace |
| Namespace | entity.name.namespace |
| New / Delete | keyword.operator.new |
| Operator Function | entity.name.function.operator |
| Operator Overload Function | entity.name.function.operator |
| Operator Overload Member | entity.name.function.operator.member |
| Parameter | variable.parameter |
| Property (C++/CLI) | variable.other.property |
| Reference Type (C++/CLI) | entity.name.class.reference |
| Static Member Field | variable.other.member.static |
| Property (C++/CLI) | variable.other.property.cli |
| Reference Type (C++/CLI) | entity.name.type.class.reference |
| Static Member Field | variable.other.property.static |
| Static Member Function | entity.name.function.member.static |
| Type | entity.name.type |
| User-Defined Literal - Number | entity.name.user-defined-literal.number |
| User-Defined Literal - Raw | entity.name.user-defined-literal |
| User-Defined Literal - String | entity.name.user-defined-literal.string |
| Value Type (C++/CLI) | entity.name.class.value |
| Type | entity.name.type.class |
| User-Defined Literal - Number | entity.name.operator.custom-literal.number |
| User-Defined Literal - Raw | entity.name.operator.custom-literal |
| User-Defined Literal - String | entity.name.operator.custom-literal.string |
| Value Type (C++/CLI) | entity.name.type.class.value |
Many of the tokens recognized by IntelliSense do not directly map to existing scopes in the VS Code's default C/C++ TextMate grammar, so are likely not colored by existing VS Code themes.
@@ -55,7 +55,7 @@ Colors can also be overridden globally, in settings:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "entity.name.type",
"scope": "entity.name.type.class",
"settings": {
"foreground": "#FF0000",
"fontStyle": "italic bold underline"
@@ -70,7 +70,7 @@ Or, overridden on a per-theme basis:
"[Visual Studio Dark]": {
"textMateRules": [
{
"scope": "entity.name.type",
"scope": "entity.name.type.class",
"settings": {
"foreground": "#FF0000",
"fontStyle": "italic bold underline"
@@ -171,19 +171,19 @@ Use the following to augment the Visual Studio Dark theme to match what Visual S
}
},
{
"scope": "entity.name.type",
"scope": "entity.name.type.class",
"settings": {
"foreground": "#4EC9B0"
}
},
{
"scope": "entity.name.class.reference",
"scope": "entity.name.type.class.reference",
"settings": {
"foreground": "#4EC9B0"
}
},
{
"scope": "entity.name.class.value",
"scope": "entity.name.type.class.value",
"settings": {
"foreground": "#4EC9B0"
}
@@ -201,7 +201,7 @@ Use the following to augment the Visual Studio Dark theme to match what Visual S
}
},
{
"scope": "variable.other.member",
"scope": "variable.other.property",
"settings": {
"foreground": "#DADADA"
}
@@ -213,7 +213,7 @@ Use the following to augment the Visual Studio Dark theme to match what Visual S
}
},
{
"scope": "variable.other.member.static",
"scope": "variable.other.property.static",
"settings": {
"foreground": "#C8C8C8"
}
@@ -225,19 +225,19 @@ Use the following to augment the Visual Studio Dark theme to match what Visual S
}
},
{
"scope": "entity.name.class.template",
"scope": "entity.name.type.class.templated",
"settings": {
"foreground": "#4EC9B0"
}
},
{
"scope": "entity.name.class.generic",
"scope": "entity.name.type.class.generic",
"settings": {
"foreground": "#4EC9B0"
}
},
{
"scope": "entity.name.function.template",
"scope": "entity.name.function.templated",
"settings": {
"foreground": "#C8C8C8"
}
@@ -255,19 +255,19 @@ Use the following to augment the Visual Studio Dark theme to match what Visual S
}
},
{
"scope": "entity.name.user-defined-literal",
"scope": "entity.name.operator.custom-literal",
"settings": {
"foreground": "#DADADA"
}
},
{
"scope": "entity.name.user-defined-literal.string",
"scope": "entity.name.operator.custom-literal.string",
"settings": {
"foreground": "#D69D85"
}
},
{
"scope": "entity.name.user-defined-literal.number",
"scope": "entity.name.operator.custom-literal.number",
"settings": {
"foreground": "#B5CEA8"
}
@@ -386,19 +386,19 @@ Use the following to augment the Visual Studio Light theme to match what Visual
}
},
{
"scope": "entity.name.type",
"scope": "entity.name.type.class",
"settings": {
"foreground": "#2B91AF"
}
},
{
"scope": "entity.name.class.reference",
"scope": "entity.name.type.class.reference",
"settings": {
"foreground": "#2B91AF"
}
},
{
"scope": "entity.name.class.value",
"scope": "entity.name.type.class.value",
"settings": {
"foreground": "#2B91AF"
}
@@ -416,7 +416,7 @@ Use the following to augment the Visual Studio Light theme to match what Visual
}
},
{
"scope": "variable.other.member",
"scope": "variable.other.property",
"settings": {
"foreground": "#000000"
}
@@ -428,7 +428,7 @@ Use the following to augment the Visual Studio Light theme to match what Visual
}
},
{
"scope": "variable.other.member.static",
"scope": "variable.other.property.static",
"settings": {
"foreground": "#000000"
}
@@ -440,19 +440,19 @@ Use the following to augment the Visual Studio Light theme to match what Visual
}
},
{
"scope": "entity.name.class.template",
"scope": "entity.name.type.class.templated",
"settings": {
"foreground": "#2B91AF"
}
},
{
"scope": "entity.name.class.generic",
"scope": "entity.name.type.class.generic",
"settings": {
"foreground": "#2B91AF"
}
},
{
"scope": "entity.name.function.template",
"scope": "entity.name.function.templated",
"settings": {
"foreground": "#000000"
}
@@ -470,19 +470,19 @@ Use the following to augment the Visual Studio Light theme to match what Visual
}
},
{
"scope": "entity.name.user-defined-literal",
"scope": "entity.name.operator.custom-literal",
"settings": {
"foreground": "#000000"
}
},
{
"scope": "entity.name.user-defined-literal.string",
"scope": "entity.name.operator.custom-literal.string",
"settings": {
"foreground": "#A31515"
}
},
{
"scope": "entity.name.user-defined-literal.number",
"scope": "entity.name.operator.custom-literal.number",
"settings": {
"foreground": "#000000"
}
+5
View File
@@ -1,5 +1,10 @@
# C/C++ for Visual Studio Code Change Log
## Version 0.24.1: July 22, 2019
### Bug Fixes
* Fix an issue with the Outline not being populated when a file is opened. [#3877](https://github.com/microsoft/vscode-cpptools/issues/3877)
* Update scopes used by semantic colorization. [PR# 3896](https://github.com/microsoft/vscode-cpptools/pull/3896)
## Version 0.24.0: July 3, 2019
### New Features
* Semantic colorization [Documentation](https://github.com/microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/colorization.md) [#230](https://github.com/microsoft/vscode-cpptools/issues/230)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cpptools",
"version": "0.24.0-master",
"version": "0.24.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "cpptools",
"displayName": "C/C++",
"description": "C/C++ IntelliSense, debugging, and code browsing.",
"version": "0.24.0-master",
"version": "0.24.1",
"publisher": "ms-vscode",
"preview": true,
"icon": "LanguageCCPP_color_128x.png",
+97 -73
View File
@@ -786,75 +786,76 @@ class DefaultClient implements Client {
}
public async provideCustomConfiguration(document: vscode.TextDocument): Promise<void> {
let tokenSource: CancellationTokenSource = new CancellationTokenSource();
let providers: CustomConfigurationProviderCollection = getCustomConfigProviders();
if (providers.size === 0) {
return Promise.resolve();
}
console.log("provideCustomConfiguration");
let providerId: string|undefined = await this.getCustomConfigurationProviderId();
if (!providerId) {
return Promise.resolve();
}
let providerName: string = providerId;
let params: QueryTranslationUnitSourceParams = {
uri: document.uri.toString()
};
let response: QueryTranslationUnitSourceResult = await this.requestWhenReady(() => this.languageClient.sendRequest(QueryTranslationUnitSourceRequest, params));
if (response.configDisposition === QueryTranslationUnitSourceConfigDisposition.ConfigNotNeeded) {
return Promise.resolve();
}
let tuUri: vscode.Uri = vscode.Uri.parse(response.uri);
let configName: string = await this.getCurrentConfigName();
const notReadyMessage: string = `${providerName} is not ready`;
let provideConfigurationAsync: () => Thenable<SourceFileConfigurationItem[]> = async () => {
// The config requests that we use a provider, try to get IntelliSense configuration info from that provider.
try {
let provider: CustomConfigurationProvider1|null = providers.get(providerId);
if (provider) {
if (!provider.isReady) {
return Promise.reject(notReadyMessage);
}
providerName = provider.name;
if (await provider.canProvideConfiguration(tuUri, tokenSource.token)) {
return provider.provideConfigurations([tuUri], tokenSource.token);
}
}
} catch (err) {
return this.queueBlockingTask(async () => {
let tokenSource: CancellationTokenSource = new CancellationTokenSource();
let providers: CustomConfigurationProviderCollection = getCustomConfigProviders();
if (providers.size === 0) {
return Promise.resolve();
}
console.log("provideCustomConfiguration");
let providerId: string|undefined = this.configuration.CurrentConfigurationProvider;
if (!providerId) {
return Promise.resolve();
}
console.warn("failed to provide configuration");
return Promise.reject("");
};
return this.queueTaskWithTimeout(provideConfigurationAsync, configProviderTimeout, tokenSource).then(
(configs: SourceFileConfigurationItem[]) => {
if (configs && configs.length > 0) {
this.sendCustomConfigurations(configs, true);
if (response.configDisposition === QueryTranslationUnitSourceConfigDisposition.AncestorConfigNeeded) {
// replacing uri with original uri
let newConfig: SourceFileConfigurationItem = { uri: document.uri, configuration: configs[0].configuration };
this.sendCustomConfigurations([newConfig], true);
}
}
},
(err) => {
if (err === notReadyMessage) {
return;
}
let settings: CppSettings = new CppSettings(this.RootUri);
if (settings.configurationWarnings === "Enabled" && !this.isExternalHeader(document.uri) && !vscode.debug.activeDebugSession) {
const dismiss: string = "Dismiss";
const disable: string = "Disable Warnings";
let message: string = `'${providerName}' is unable to provide IntelliSense configuration information for '${document.uri.fsPath}'. ` +
`Settings from the '${configName}' configuration will be used instead.`;
if (err) {
message += ` (${err})`;
}
let providerName: string = providerId;
let params: QueryTranslationUnitSourceParams = {
uri: document.uri.toString()
};
let response: QueryTranslationUnitSourceResult = await this.languageClient.sendRequest(QueryTranslationUnitSourceRequest, params);
if (response.configDisposition === QueryTranslationUnitSourceConfigDisposition.ConfigNotNeeded) {
return Promise.resolve();
}
vscode.window.showInformationMessage(message, dismiss, disable).then(response => {
let tuUri: vscode.Uri = vscode.Uri.parse(response.uri);
let configName: string = this.configuration.CurrentConfiguration.name;
const notReadyMessage: string = `${providerName} is not ready`;
let provideConfigurationAsync: () => Thenable<SourceFileConfigurationItem[]> = async () => {
// The config requests that we use a provider, try to get IntelliSense configuration info from that provider.
try {
let provider: CustomConfigurationProvider1|null = providers.get(providerId);
if (provider) {
if (!provider.isReady) {
return Promise.reject(notReadyMessage);
}
providerName = provider.name;
if (await provider.canProvideConfiguration(tuUri, tokenSource.token)) {
return provider.provideConfigurations([tuUri], tokenSource.token);
}
}
} catch (err) {
}
console.warn("failed to provide configuration");
return Promise.reject("");
};
return this.callTaskWithTimeout(provideConfigurationAsync, configProviderTimeout, tokenSource).then(
(configs: SourceFileConfigurationItem[]) => {
if (configs && configs.length > 0) {
this.sendCustomConfigurations(configs, false);
if (response.configDisposition === QueryTranslationUnitSourceConfigDisposition.AncestorConfigNeeded) {
// replacing uri with original uri
let newConfig: SourceFileConfigurationItem = { uri: document.uri, configuration: configs[0].configuration };
this.sendCustomConfigurations([newConfig], false);
}
}
},
(err) => {
if (err === notReadyMessage) {
return;
}
let settings: CppSettings = new CppSettings(this.RootUri);
if (settings.configurationWarnings === "Enabled" && !this.isExternalHeader(document.uri) && !vscode.debug.activeDebugSession) {
const dismiss: string = "Dismiss";
const disable: string = "Disable Warnings";
let message: string = `'${providerName}' is unable to provide IntelliSense configuration information for '${document.uri.fsPath}'. ` +
`Settings from the '${configName}' configuration will be used instead.`;
if (err) {
message += ` (${err})`;
}
vscode.window.showInformationMessage(message, dismiss, disable).then(response => {
switch (response) {
case disable: {
settings.toggleSetting("configurationWarnings", "Enabled", "Disabled");
@@ -862,18 +863,15 @@ class DefaultClient implements Client {
}
}
});
}
});
}
});
});
}
private isExternalHeader(uri: vscode.Uri): boolean {
return util.isHeader(uri) && !uri.toString().startsWith(this.RootUri.toString());
}
private getCustomConfigurationProviderId(): Thenable<string|undefined> {
return this.queueTask(() => Promise.resolve(this.configuration.CurrentConfigurationProvider));
}
public getCurrentConfigName(): Thenable<string> {
return this.queueTask(() => Promise.resolve(this.configuration.CurrentConfiguration.name));
}
@@ -923,7 +921,7 @@ class DefaultClient implements Client {
if (this.pendingTask && !this.pendingTask.Done) {
// We don't want the queue to stall because of a rejected promise.
return this.pendingTask.then(nextTask, nextTask);
return this.pendingTask.getPromise().then(nextTask, nextTask);
} else {
this.pendingTask = undefined;
return nextTask();
@@ -941,6 +939,7 @@ class DefaultClient implements Client {
private queueBlockingTask(task: () => Thenable<void>): Thenable<void> {
if (this.isSupported) {
this.pendingTask = new util.BlockingTask<void>(task, this.pendingTask);
return this.pendingTask.getPromise();
} else {
return Promise.reject("Unsupported client");
}
@@ -973,6 +972,31 @@ class DefaultClient implements Client {
});
}
private callTaskWithTimeout(task: () => Thenable<any>, ms: number, cancelToken?: CancellationTokenSource): Thenable<any> {
let timer: NodeJS.Timer;
// Create a promise that rejects in <ms> milliseconds
let timeout: () => Promise<any> = () => new Promise((resolve, reject) => {
timer = setTimeout(() => {
clearTimeout(timer);
if (cancelToken) {
cancelToken.cancel();
}
reject("Timed out in " + ms + "ms.");
}, ms);
});
// Returns a race between our timeout and the passed in promise
return Promise.race([task(), timeout()]).then(
(result: any) => {
clearTimeout(timer);
return result;
},
(error: any) => {
clearTimeout(timer);
throw error;
});
}
public requestWhenReady(request: () => Thenable<any>): Thenable<any> {
return this.queueTask(request);
}
+14 -14
View File
@@ -213,26 +213,26 @@ export class ColorizationSettings {
this.calculateStyleForToken(TokenKind.GlobalVariable, "variable.other.global", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.LocalVariable, "variable.other.local", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.Parameter, "variable.parameter", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.Type, "entity.name.type", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.RefType, "entity.name.class.reference", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.ValueType, "entity.name.class.value", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.Type, "entity.name.type.class", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.RefType, "entity.name.type.class.reference", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.ValueType, "entity.name.type.class.value", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.Function, "entity.name.function", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.MemberFunction, "entity.name.function.member", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.MemberField, "variable.other.member", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.MemberField, "variable.other.property", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.StaticMemberFunction, "entity.name.function.member.static", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.StaticMemberField, "variable.other.member.static", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.Property, "variable.other.property", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.StaticMemberField, "variable.other.property.static", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.Property, "variable.other.property.cli", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.Event, "variable.other.event", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.ClassTemplate, "entity.name.class.template", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.GenericType, "entity.name.class.generic", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.FunctionTemplate, "entity.name.function.template", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.Namespace, "entity.name.type.namespace", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.ClassTemplate, "entity.name.type.class.templated", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.GenericType, "entity.name.type.class.generic", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.FunctionTemplate, "entity.name.function.templated", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.Namespace, "entity.name.namespace", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.Label, "entity.name.label", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.UdlRaw, "entity.name.user-defined-literal", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.UdlNumber, "entity.name.user-defined-literal.number", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.UdlString, "entity.name.user-defined-literal.string", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.UdlRaw, "entity.name.operator.custom-literal", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.UdlNumber, "entity.name.operator.custom-literal.number", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.UdlString, "entity.name.operator.custom-literal.string", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.OperatorFunction, "entity.name.function.operator", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.MemberOperator, "keyword.operator.member", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.MemberOperator, "entity.name.function.operator.member", themeName, textMateRules);
this.calculateStyleForToken(TokenKind.NewDelete, "keyword.operator.new", themeName, textMateRules);
}
@@ -33,11 +33,8 @@ export function createProtocolFilter(me: Client, clients: ClientCollection): Mid
}
me.onDidOpenTextDocument(document);
me.provideCustomConfiguration(document).then(() => {
sendMessage(document);
}, () => {
sendMessage(document);
});
me.provideCustomConfiguration(document);
me.notifyWhenReady(() => sendMessage(document));
}
},
didChange: (textDocumentChangeEvent, sendMessage) => {
+3 -5
View File
@@ -890,16 +890,14 @@ export class BlockingTask<T> {
this.dependency.promise.then(f1, f2);
});
}
this.promise.then(() => this.done = true, () => this.done = true);
}
public get Done(): boolean {
return this.done;
}
public then<T2>(onSucceeded: (value: T) => T2, onRejected?: (err) => any): Thenable<T2> {
if (onRejected) {
return this.promise.then(onSucceeded, onRejected);
}
return this.promise.then(onSucceeded);
public getPromise(): Thenable<T> {
return this.promise;
}
}