diff --git a/extensions/emmet/src/defaultCompletionProvider.ts b/extensions/emmet/src/defaultCompletionProvider.ts index cbc57e40f961d..7febe4d1ac1d0 100644 --- a/extensions/emmet/src/defaultCompletionProvider.ts +++ b/extensions/emmet/src/defaultCompletionProvider.ts @@ -13,17 +13,11 @@ import { isValidLocationForEmmetAbbreviation } from './abbreviationActions'; import { getSyntax, getNode, getInnerRange } from './util'; export class DefaultCompletionItemProvider implements vscode.CompletionItemProvider { - private _mappedSyntax = false; - constructor(mappedSyntax?: boolean) { - if (mappedSyntax) { - this._mappedSyntax = mappedSyntax; - } - } + public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable { let syntax = getSyntax(document); - if (!this._mappedSyntax) { - syntax = this.syntaxHelper(syntax, document, position); - } + syntax = this.syntaxHelper(syntax, document, position); + if (!syntax) { return; } diff --git a/extensions/emmet/src/extension.ts b/extensions/emmet/src/extension.ts index d2f96dbdd69bc..d360663bd2176 100644 --- a/extensions/emmet/src/extension.ts +++ b/extensions/emmet/src/extension.ts @@ -17,7 +17,7 @@ import { fetchEditPoint } from './editPoint'; import { fetchSelectItem } from './selectItem'; import { evaluateMathExpression } from './evaluateMathExpression'; import { incrementDecrement } from './incrementDecrement'; -import { LANGUAGE_MODES, getMappedModes, getExcludedModes } from './util'; +import { LANGUAGE_MODES, getExcludedModes } from './util'; import { updateExtensionsPath } from 'vscode-emmet-helper'; export function activate(context: vscode.ExtensionContext) { @@ -31,14 +31,6 @@ export function activate(context: vscode.ExtensionContext) { context.subscriptions.push(provider); }); - let completionProviderForMappedSyntax = new DefaultCompletionItemProvider(true); - let mappedModes = getMappedModes(); - Object.keys(mappedModes).forEach(syntax => { - const provider = vscode.languages.registerCompletionItemProvider(syntax, completionProviderForMappedSyntax, ...LANGUAGE_MODES[mappedModes[syntax]]); - context.subscriptions.push(provider); - }); - - context.subscriptions.push(vscode.commands.registerCommand('emmet.wrapWithAbbreviation', () => { wrapWithAbbreviation(); }));