diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 19:18:58 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-23 19:18:58 +0800 |
commit | 25e076d4baa0a47a376d0ed647c68c56b817c88b (patch) | |
tree | 62ccfbb898a23387f5c02e3e97197e5e5b04fa99 /test/completion | |
parent | 2bcd7495aad00ffc47fc96e8cf801e52e7452a83 (diff) | |
download | lua-language-server-25e076d4baa0a47a376d0ed647c68c56b817c88b.zip |
fix completion in tablefield enums
Diffstat (limited to 'test/completion')
-rw-r--r-- | test/completion/common.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua index 7c383fe4..27431000 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -3396,3 +3396,25 @@ end kind = define.CompletionItemKind.Variable, }, } + +TEST [[ +---@class A +---@field xxx 'aaa'|'bbb' + +---@type A +local t = { + xxx = '<??> +} +]] +{ + { + label = "'aaa'", + kind = define.CompletionItemKind.EnumMember, + textEdit = EXISTS, + }, + { + label = "'bbb'", + kind = define.CompletionItemKind.EnumMember, + textEdit = EXISTS, + }, +} |