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:
parent
dde41be023
commit
4664a607e0
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue