diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-16 16:27:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-16 16:27:49 +0800 |
commit | 025c4c5fb2ced70e448716391be70fc47e82b1fb (patch) | |
tree | d5acdab607e63e80b9eb046d3b588168e187aa32 /test | |
parent | 05c0b9a8894bb1c24a24e2ed26e61a3b47d12d89 (diff) | |
download | lua-language-server-025c4c5fb2ced70e448716391be70fc47e82b1fb.zip |
completion: supports enums in `fun()`
Diffstat (limited to 'test')
-rw-r--r-- | test/completion/init.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua index ea1cdfdb..1ed82b2a 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -2696,3 +2696,30 @@ local r = f('$') }, }, } + +TEST [[ +---@type fun(x: "'aaa'"|"'bbb'") +local f + +f('$') +]] +{ + { + label = "'aaa'", + kind = define.CompletionItemKind.EnumMember, + textEdit = { + newText = "'aaa'", + start = 45, + finish = 46, + }, + }, + { + label = "'bbb'", + kind = define.CompletionItemKind.EnumMember, + textEdit = { + newText = "'bbb'", + start = 45, + finish = 46, + }, + }, +} |