summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-07-21 11:24:14 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-07-21 11:24:17 +0800
commita5c24f2ce9ceff780af1de82f89374c186a973e6 (patch)
treef6c6b8d24b4b9c29db9853ae2c34e10b3164323e /script/core
parent8c4c122a1d213600f2bdad05e2f18e8ffc1a180c (diff)
downloadlua-language-server-a5c24f2ce9ceff780af1de82f89374c186a973e6.zip
fix
Diffstat (limited to 'script/core')
-rw-r--r--script/core/completion/completion.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua
index 518c716e..4178293b 100644
--- a/script/core/completion/completion.lua
+++ b/script/core/completion/completion.lua
@@ -1588,7 +1588,8 @@ local function checkTableLiteralField(state, position, tbl, fields, results)
}
end),
}
- if field.optional then
+ if field.optional
+ or vm.compileNode(field):isNullable() then
res.insertText = res.label
res.label = res.label.. '?'
end