summaryrefslogtreecommitdiff
path: root/server/test/completion
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-10 20:03:20 +0800
committersumneko <sumneko@hotmail.com>2019-04-10 20:03:20 +0800
commitce9e8a5033dd9ea9bfd2bb2c53af0906e638db28 (patch)
tree86f5947ce21cc999dc8b296cf8d104db8485f549 /server/test/completion
parent6bf376e26dee271bdf0767e0a23f73e7bfede4c6 (diff)
downloadlua-language-server-ce9e8a5033dd9ea9bfd2bb2c53af0906e638db28.zip
自动完成显示 __index 元方法内的成员
Diffstat (limited to 'server/test/completion')
-rw-r--r--server/test/completion/init.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua
index ed68dec5..6c1fe7ad 100644
--- a/server/test/completion/init.lua
+++ b/server/test/completion/init.lua
@@ -755,3 +755,17 @@ local *tocl@
kind = CompletionItemKind.Keyword,
}
}
+
+TEST [[
+local mt = {}
+mt.__index = mt
+local t = setmetatable({}, mt)
+
+t.@
+]]
+{
+ {
+ label = '__index',
+ kind = CompletionItemKind.Field,
+ }
+}