From 916af592dd75a11b673eb9992514bc40b0978f3b Mon Sep 17 00:00:00 2001 From: Qiming Zhao Date: Wed, 15 Apr 2020 19:14:50 +0800 Subject: [PATCH] fix insertText for optional completionItem --- src/server/utils/completionItem.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/utils/completionItem.ts b/src/server/utils/completionItem.ts index 08d6bd6..5aa9314 100644 --- a/src/server/utils/completionItem.ts +++ b/src/server/utils/completionItem.ts @@ -66,6 +66,7 @@ export function convertCompletionEntry( if (tsEntry.kindModifiers) { const kindModifiers = new Set(tsEntry.kindModifiers.split(/,|\s+/g)) if (kindModifiers.has(PConst.KindModifiers.optional)) { + insertText = label label += '?' }