Revert "Restrict html/css to only handling file and untitled files. Part of #48777"

This reverts commit 0dfeec2eef.
This commit is contained in:
Pine Wu
2018-05-02 10:13:29 -07:00
parent c26adc1916
commit e4e7c25708
3 changed files with 3 additions and 22 deletions

View File

@@ -171,12 +171,7 @@ connection.onDidChangeConfiguration((change) => {
let enableFormatter = globalSettings && globalSettings.html && globalSettings.html.format && globalSettings.html.format.enable;
if (enableFormatter) {
if (!formatterRegistration) {
let documentSelector: DocumentSelector = [
{ language: 'html', scheme: 'file' },
{ language: 'html', scheme: 'untitled' },
{ language: 'handlebars', scheme: 'file' },
{ language: 'handlebars', scheme: 'untitled' }
]; // don't register razor, the formatter does more harm than good
let documentSelector: DocumentSelector = [{ language: 'html' }, { language: 'handlebars' }]; // don't register razor, the formatter does more harm than good
formatterRegistration = connection.client.register(DocumentRangeFormattingRequest.type, { documentSelector });
}
} else if (formatterRegistration) {