Disable emmet completion provider for mapped modes #29318

This commit is contained in:
Ramya Achutha Rao
2017-06-23 11:52:42 -07:00
parent f4055d958c
commit f3a9600079
2 changed files with 4 additions and 18 deletions

View File

@@ -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<vscode.CompletionList> {
let syntax = getSyntax(document);
if (!this._mappedSyntax) {
syntax = this.syntaxHelper(syntax, document, position);
}
syntax = this.syntaxHelper(syntax, document, position);
if (!syntax) {
return;
}