From fb9bde0c08ac88b056a37f03ab52b530f3ff97e2 Mon Sep 17 00:00:00 2001 From: Qiming Zhao Date: Fri, 8 Apr 2022 22:40:10 +0800 Subject: [PATCH] support SymbolKind.Constructor and localFunction as snippet --- src/server/features/documentSymbol.ts | 1 + src/server/utils/completionItem.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/server/features/documentSymbol.ts b/src/server/features/documentSymbol.ts index 98a4586..3a78abc 100644 --- a/src/server/features/documentSymbol.ts +++ b/src/server/features/documentSymbol.ts @@ -38,6 +38,7 @@ const getSymbolKind = (kind: string): SymbolKind => { return SymbolKind.Variable case PConst.Kind.constructSignature: case PConst.Kind.constructorImplementation: + return SymbolKind.Constructor case PConst.Kind.function: case PConst.Kind.localFunction: return SymbolKind.Function diff --git a/src/server/utils/completionItem.ts b/src/server/utils/completionItem.ts index 499df4a..0bd8ab4 100644 --- a/src/server/utils/completionItem.ts +++ b/src/server/utils/completionItem.ts @@ -139,6 +139,7 @@ function convertKind(kind: string): CompletionItemKind { case PConst.Kind.memberSetAccessor: return CompletionItemKind.Field case PConst.Kind.function: + case PConst.Kind.localFunction: return CompletionItemKind.Function case PConst.Kind.method: case PConst.Kind.constructSignature: