💄
This commit is contained in:
parent
22a6d920b3
commit
564c619d73
1 changed files with 17 additions and 1 deletions
|
@ -45,6 +45,7 @@ interface CompletionContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyCompletionItem extends vscode.CompletionItem {
|
class MyCompletionItem extends vscode.CompletionItem {
|
||||||
|
|
||||||
public readonly useCodeSnippet: boolean;
|
public readonly useCodeSnippet: boolean;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -206,6 +207,7 @@ class MyCompletionItem extends vscode.CompletionItem {
|
||||||
case PConst.Kind.primitiveType:
|
case PConst.Kind.primitiveType:
|
||||||
case PConst.Kind.keyword:
|
case PConst.Kind.keyword:
|
||||||
return vscode.CompletionItemKind.Keyword;
|
return vscode.CompletionItemKind.Keyword;
|
||||||
|
|
||||||
case PConst.Kind.const:
|
case PConst.Kind.const:
|
||||||
case PConst.Kind.let:
|
case PConst.Kind.let:
|
||||||
case PConst.Kind.variable:
|
case PConst.Kind.variable:
|
||||||
|
@ -213,41 +215,55 @@ class MyCompletionItem extends vscode.CompletionItem {
|
||||||
case PConst.Kind.alias:
|
case PConst.Kind.alias:
|
||||||
case PConst.Kind.parameter:
|
case PConst.Kind.parameter:
|
||||||
return vscode.CompletionItemKind.Variable;
|
return vscode.CompletionItemKind.Variable;
|
||||||
|
|
||||||
case PConst.Kind.memberVariable:
|
case PConst.Kind.memberVariable:
|
||||||
case PConst.Kind.memberGetAccessor:
|
case PConst.Kind.memberGetAccessor:
|
||||||
case PConst.Kind.memberSetAccessor:
|
case PConst.Kind.memberSetAccessor:
|
||||||
return vscode.CompletionItemKind.Field;
|
return vscode.CompletionItemKind.Field;
|
||||||
|
|
||||||
case PConst.Kind.function:
|
case PConst.Kind.function:
|
||||||
case PConst.Kind.localFunction:
|
case PConst.Kind.localFunction:
|
||||||
return vscode.CompletionItemKind.Function;
|
return vscode.CompletionItemKind.Function;
|
||||||
|
|
||||||
case PConst.Kind.method:
|
case PConst.Kind.method:
|
||||||
case PConst.Kind.constructSignature:
|
case PConst.Kind.constructSignature:
|
||||||
case PConst.Kind.callSignature:
|
case PConst.Kind.callSignature:
|
||||||
case PConst.Kind.indexSignature:
|
case PConst.Kind.indexSignature:
|
||||||
return vscode.CompletionItemKind.Method;
|
return vscode.CompletionItemKind.Method;
|
||||||
|
|
||||||
case PConst.Kind.enum:
|
case PConst.Kind.enum:
|
||||||
return vscode.CompletionItemKind.Enum;
|
return vscode.CompletionItemKind.Enum;
|
||||||
|
|
||||||
case PConst.Kind.enumMember:
|
case PConst.Kind.enumMember:
|
||||||
return vscode.CompletionItemKind.EnumMember;
|
return vscode.CompletionItemKind.EnumMember;
|
||||||
|
|
||||||
case PConst.Kind.module:
|
case PConst.Kind.module:
|
||||||
case PConst.Kind.externalModuleName:
|
case PConst.Kind.externalModuleName:
|
||||||
return vscode.CompletionItemKind.Module;
|
return vscode.CompletionItemKind.Module;
|
||||||
|
|
||||||
case PConst.Kind.class:
|
case PConst.Kind.class:
|
||||||
case PConst.Kind.type:
|
case PConst.Kind.type:
|
||||||
return vscode.CompletionItemKind.Class;
|
return vscode.CompletionItemKind.Class;
|
||||||
|
|
||||||
case PConst.Kind.interface:
|
case PConst.Kind.interface:
|
||||||
return vscode.CompletionItemKind.Interface;
|
return vscode.CompletionItemKind.Interface;
|
||||||
|
|
||||||
case PConst.Kind.warning:
|
case PConst.Kind.warning:
|
||||||
return vscode.CompletionItemKind.Text;
|
return vscode.CompletionItemKind.Text;
|
||||||
|
|
||||||
case PConst.Kind.script:
|
case PConst.Kind.script:
|
||||||
return vscode.CompletionItemKind.File;
|
return vscode.CompletionItemKind.File;
|
||||||
|
|
||||||
case PConst.Kind.directory:
|
case PConst.Kind.directory:
|
||||||
return vscode.CompletionItemKind.Folder;
|
return vscode.CompletionItemKind.Folder;
|
||||||
|
|
||||||
case PConst.Kind.string:
|
case PConst.Kind.string:
|
||||||
return vscode.CompletionItemKind.Constant;
|
return vscode.CompletionItemKind.Constant;
|
||||||
}
|
|
||||||
|
default:
|
||||||
return vscode.CompletionItemKind.Property;
|
return vscode.CompletionItemKind.Property;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@memoize
|
@memoize
|
||||||
public get commitCharacters(): string[] | undefined {
|
public get commitCharacters(): string[] | undefined {
|
||||||
|
|
Loading…
Reference in a new issue