summaryrefslogtreecommitdiff
path: root/server/test/completion/init.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-22 21:15:13 +0800
committersumneko <sumneko@hotmail.com>2019-04-22 21:15:13 +0800
commitafd5e3671b44ecaf0d1fff9a3903b91575614381 (patch)
treebb324d34b2d550882ee4f7a76cf5812c4e6571dd /server/test/completion/init.lua
parentb741082ca2efc42c62bce3c2634aaec25145b93e (diff)
downloadlua-language-server-afd5e3671b44ecaf0d1fff9a3903b91575614381.zip
emmyType 的自动完成
Diffstat (limited to 'server/test/completion/init.lua')
-rw-r--r--server/test/completion/init.lua40
1 files changed, 40 insertions, 0 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua
index 560f6fa4..0f4b27d3 100644
--- a/server/test/completion/init.lua
+++ b/server/test/completion/init.lua
@@ -784,3 +784,43 @@ TEST [[
kind = CompletionItemKind.Class,
},
}
+
+TEST [[
+---@class abc
+local abcd
+---@type a$
+]]
+{
+ {
+ label = 'abc',
+ kind = CompletionItemKind.Class,
+ },
+}
+
+TEST [[
+---@class abc
+local abcd
+---@type $
+]]
+{
+ {
+ label = 'abc',
+ kind = CompletionItemKind.Class,
+ },
+}
+
+TEST [[
+---@class abc
+local abcd
+---@type xxx|$
+]]
+{
+ {
+ label = 'abc',
+ kind = CompletionItemKind.Class,
+ },
+ {
+ label = 'xxx',
+ kind = CompletionItemKind.Class,
+ },
+}