diff options
Diffstat (limited to 'script/core/completion/completion.lua')
-rw-r--r-- | script/core/completion/completion.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua index c257643d..beff594c 100644 --- a/script/core/completion/completion.lua +++ b/script/core/completion/completion.lua @@ -1121,9 +1121,10 @@ local function checkTypingEnum(state, position, defs, str, results) local enums = {} for _, def in ipairs(defs) do if def.type == 'doc.type.string' - or def.type == 'doc.type.integer' then + or def.type == 'doc.type.integer' + or def.type == 'doc.type.boolean' then enums[#enums+1] = { - label = util.viewLiteral(def[1]), + label = infer.viewObject(def), description = def.comment and def.comment.text, kind = define.CompletionItemKind.EnumMember, } @@ -1412,7 +1413,7 @@ local function tryCallArg(state, position, results) or src.type == 'doc.type.integer' or src.type == 'doc.type.boolean' then enums[#enums+1] = { - label = util.viewLiteral(src[1]), + label = infer.viewObject(src), description = src.comment, kind = define.CompletionItemKind.EnumMember, } |