From 4dbde8211c2ff7344660b9e7ad2fd9ec76da7619 Mon Sep 17 00:00:00 2001 From: Qiming Zhao Date: Mon, 2 May 2022 14:44:37 +0800 Subject: [PATCH] fix bad insertText Closes #363 --- src/server/utils/completionItem.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/utils/completionItem.ts b/src/server/utils/completionItem.ts index 0bd8ab4..4c2f920 100644 --- a/src/server/utils/completionItem.ts +++ b/src/server/utils/completionItem.ts @@ -76,7 +76,7 @@ export function convertCompletionEntry( if (tsEntry.kindModifiers) { const kindModifiers = new Set(tsEntry.kindModifiers.split(/,|\s+/g)) if (kindModifiers.has(PConst.KindModifiers.optional)) { - insertText = label + insertText = insertText ?? label label += '?' }