From 4ee15998d34da2b2739600ac37d1b7bf581c9552 Mon Sep 17 00:00:00 2001 From: Erik Lieben Date: Thu, 2 Feb 2017 19:47:42 +0100 Subject: [PATCH] feat(vscode): SnippetString was removed and API changed to InsertTextFormat.Snippet --- .../services/htmlCompletion.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/server/aurelia-languageservice/services/htmlCompletion.ts b/src/server/aurelia-languageservice/services/htmlCompletion.ts index b5d6c35b..3c193066 100644 --- a/src/server/aurelia-languageservice/services/htmlCompletion.ts +++ b/src/server/aurelia-languageservice/services/htmlCompletion.ts @@ -1,4 +1,4 @@ -import { TextDocument, Position, CompletionList, CompletionItemKind, Range, SnippetString } from 'vscode-languageserver-types'; +import { TextDocument, Position, CompletionList, CompletionItemKind, Range, InsertTextFormat } from 'vscode-languageserver-types'; import { HTMLDocument } from '../parser/htmlParser'; import { TokenType, createScanner, ScannerState } from '../parser/htmlScanner'; import { getAureliaTagProvider } from '../parser/aureliaTagProvider'; @@ -48,7 +48,7 @@ export function doComplete(document: TextDocument, position: Position, htmlDocum documentation: label, kind: CompletionItemKind.Property, label: tag, - range, + //range, }); }); return result; @@ -68,10 +68,11 @@ export function doComplete(document: TextDocument, position: Position, htmlDocum codeSnippet = codeSnippet + value; } result.items.push({ - insertText: SnippetString.create(codeSnippet), + insertText: codeSnippet, kind: type === 'handler' ? CompletionItemKind.Function : CompletionItemKind.Value, label: attribute, - range, + insertTextFormat : InsertTextFormat.Snippet + //range, }); }); return result; @@ -101,7 +102,7 @@ export function doComplete(document: TextDocument, position: Position, htmlDocum kind: CompletionItemKind.Unit, label: value, insertText, - range, + //range, }); }); return result;