Support CompletionItemKind.Method

Previously, if a registered completion provider returned items with
CompletionItemKind.Method, they would display in the list as properties,
due to not being converted to the corresponding SuggestionType.
This commit is contained in:
Sandy Armstrong 2016-08-05 14:39:56 -07:00
parent dde41be023
commit 4664a607e0
2 changed files with 2 additions and 0 deletions

View file

@ -353,6 +353,7 @@ interface ISuggestion2 extends modes.ISuggestion {
}
function convertKind(kind: CompletionItemKind): modes.SuggestionType {
switch (kind) {
case CompletionItemKind.Method: return 'method';
case CompletionItemKind.Function: return 'function';
case CompletionItemKind.Constructor: return 'constructor';
case CompletionItemKind.Field: return 'field';

View file

@ -240,6 +240,7 @@ export const CompletionItemKind = {
from(kind: types.CompletionItemKind): modes.SuggestionType {
switch (kind) {
case types.CompletionItemKind.Method: return 'method';
case types.CompletionItemKind.Function: return 'function';
case types.CompletionItemKind.Constructor: return 'constructor';
case types.CompletionItemKind.Field: return 'field';