Remove onDidChagne events. Deprecate [lan].colorDecorators.enable and

use editor.colorDecorators for all.
This commit is contained in:
rebornix
2017-08-24 15:38:39 -07:00
committed by Peng Lyu
parent ef690ded3e
commit 879373d9e1
11 changed files with 110 additions and 150 deletions

View File

@@ -119,11 +119,8 @@ export function activate(context: ExtensionContext) {
let colorRequestor = (uri: string) => {
return client.sendRequest(ColorSymbolRequest.type, uri).then(ranges => ranges.map(client.protocol2CodeConverter.asRange));
};
let isDecoratorEnabled = (languageId: string) => {
return workspace.getConfiguration().get<boolean>(languageId + '.colorDecorators.enable');
};
context.subscriptions.push(languages.registerColorProvider('json', new ColorProvider(colorRequestor, { json: true }, isDecoratorEnabled)));
context.subscriptions.push(languages.registerColorProvider('json', new ColorProvider(colorRequestor)));
});
// Push the disposable to the context's subscriptions so that the