Skip to content

Commit

Permalink
feat(vscode): SnippetString was removed and API changed to InsertText…
Browse files Browse the repository at this point in the history
…Format.Snippet
  • Loading branch information
Erik Lieben committed Feb 2, 2017
1 parent 3794414 commit 4ee1599
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/server/aurelia-languageservice/services/htmlCompletion.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -48,7 +48,7 @@ export function doComplete(document: TextDocument, position: Position, htmlDocum
documentation: label,
kind: CompletionItemKind.Property,
label: tag,
range,
//range,
});
});
return result;
Expand All @@ -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;
Expand Down Expand Up @@ -101,7 +102,7 @@ export function doComplete(document: TextDocument, position: Position, htmlDocum
kind: CompletionItemKind.Unit,
label: value,
insertText,
range,
//range,
});
});
return result;
Expand Down

0 comments on commit 4ee1599

Please sign in to comment.