[json] dynamically enable & disable formatter

This commit is contained in:
Martin Aeschlimann
2017-01-30 16:32:22 +01:00
parent 762a189993
commit bb18628a66
2 changed files with 36 additions and 7 deletions

View File

@@ -57,12 +57,11 @@ export function activate(context: ExtensionContext) {
documentSelector: ['json'],
synchronize: {
// Synchronize the setting section 'json' to the server
configurationSection: ['json.schemas', 'http.proxy', 'http.proxyStrictSSL'],
configurationSection: ['json', 'http.proxy', 'http.proxyStrictSSL'],
fileEvents: workspace.createFileSystemWatcher('**/*.json')
},
initializationOptions: {
languageIds,
['format.enable']: workspace.getConfiguration('json').get('format.enable')
languageIds
}
};