fix insertText for optional completionItem

This commit is contained in:
Qiming Zhao 2020-04-15 19:14:50 +08:00
parent c40430420d
commit 916af592dd

View file

@ -66,6 +66,7 @@ export function convertCompletionEntry(
if (tsEntry.kindModifiers) { if (tsEntry.kindModifiers) {
const kindModifiers = new Set(tsEntry.kindModifiers.split(/,|\s+/g)) const kindModifiers = new Set(tsEntry.kindModifiers.split(/,|\s+/g))
if (kindModifiers.has(PConst.KindModifiers.optional)) { if (kindModifiers.has(PConst.KindModifiers.optional)) {
insertText = label
label += '?' label += '?'
} }