summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-16 16:27:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-16 16:27:49 +0800
commit025c4c5fb2ced70e448716391be70fc47e82b1fb (patch)
treed5acdab607e63e80b9eb046d3b588168e187aa32 /test
parent05c0b9a8894bb1c24a24e2ed26e61a3b47d12d89 (diff)
downloadlua-language-server-025c4c5fb2ced70e448716391be70fc47e82b1fb.zip
completion: supports enums in `fun()`
Diffstat (limited to 'test')
-rw-r--r--test/completion/init.lua27
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,
+ },
+ },
+}