diff --git a/extensions/emmet/src/defaultCompletionProvider.ts b/extensions/emmet/src/defaultCompletionProvider.ts index fe5a478f1061c..b6edd606da3c9 100644 --- a/extensions/emmet/src/defaultCompletionProvider.ts +++ b/extensions/emmet/src/defaultCompletionProvider.ts @@ -10,12 +10,15 @@ import { Node, HtmlNode } from 'EmmetNode'; import { DocumentStreamReader } from './bufferStream'; import { EmmetCompletionItemProvider, isStyleSheet } from 'vscode-emmet-helper'; import { isValidLocationForEmmetAbbreviation } from './abbreviationActions'; -import { getSyntax, getNode, getInnerRange } from './util'; +import { getSyntax, getNode, getInnerRange, getExcludedModes } from './util'; export class DefaultCompletionItemProvider implements vscode.CompletionItemProvider { public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable { let syntax = getSyntax(document); + if (getExcludedModes().indexOf(syntax) > -1) { + return; + } syntax = this.syntaxHelper(syntax, document, position); if (!syntax) { diff --git a/extensions/emmet/src/extension.ts b/extensions/emmet/src/extension.ts index 73f26dab9aa4d..e8ac1cbdf15bd 100644 --- a/extensions/emmet/src/extension.ts +++ b/extensions/emmet/src/extension.ts @@ -22,9 +22,9 @@ import { updateExtensionsPath } from 'vscode-emmet-helper'; export function activate(context: vscode.ExtensionContext) { let completionProvider = new DefaultCompletionItemProvider(); - let exlcludedLanguages = getExcludedModes(); + let excludedLanguages = getExcludedModes(); Object.keys(LANGUAGE_MODES).forEach(language => { - if (exlcludedLanguages.indexOf(language) > -1) { + if (excludedLanguages.indexOf(language) > -1) { return; } const provider = vscode.languages.registerCompletionItemProvider(language, completionProvider, ...LANGUAGE_MODES[language]);