Revert "Restrict html/css to only handling file and untitled files. Part of #48777"
This reverts commit 0dfeec2eef
.
This commit is contained in:
parent
c26adc1916
commit
e4e7c25708
3 changed files with 3 additions and 22 deletions
|
@ -27,14 +27,7 @@ export function activate(context: ExtensionContext) {
|
|||
debug: { module: serverModule, transport: TransportKind.ipc, options: debugOptions }
|
||||
};
|
||||
|
||||
let documentSelector = [
|
||||
{ language: 'css', scheme: 'file' },
|
||||
{ language: 'css', scheme: 'untitled' },
|
||||
{ language: 'scss', scheme: 'file' },
|
||||
{ language: 'scss', scheme: 'untitled' },
|
||||
{ language: 'less', scheme: 'file' },
|
||||
{ language: 'less', scheme: 'untitled' },
|
||||
];
|
||||
let documentSelector = ['css', 'scss', 'less'];
|
||||
|
||||
// Options to control the language client
|
||||
let clientOptions: LanguageClientOptions = {
|
||||
|
|
|
@ -47,14 +47,7 @@ export function activate(context: ExtensionContext) {
|
|||
debug: { module: serverModule, transport: TransportKind.ipc, options: debugOptions }
|
||||
};
|
||||
|
||||
let documentSelector = [
|
||||
{ language: 'html', scheme: 'file' },
|
||||
{ language: 'html', scheme: 'untitled' },
|
||||
{ language: 'handlebars', scheme: 'file' },
|
||||
{ language: 'handlebars', scheme: 'untitled' },
|
||||
{ language: 'razor', scheme: 'file' },
|
||||
{ language: 'razor', scheme: 'untitled' }
|
||||
];
|
||||
let documentSelector = ['html', 'handlebars', 'razor'];
|
||||
let embeddedLanguages = { css: true, javascript: true };
|
||||
|
||||
// Options to control the language client
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue