summaryrefslogtreecommitdiff
path: root/test-beta/completion/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-17 20:19:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-17 20:19:50 +0800
commita09f301b5bb3d2a2bbceec9881c4091a7665bf56 (patch)
treecd2bdc7dbb3edb4115280622225f050b8a6eb48d /test-beta/completion/init.lua
parentb6c59b00a307b7cb6396e96c65611a08ac3c3339 (diff)
downloadlua-language-server-a09f301b5bb3d2a2bbceec9881c4091a7665bf56.zip
更新index支持
Diffstat (limited to 'test-beta/completion/init.lua')
-rw-r--r--test-beta/completion/init.lua45
1 files changed, 45 insertions, 0 deletions
diff --git a/test-beta/completion/init.lua b/test-beta/completion/init.lua
index cf79d795..f2fa9edf 100644
--- a/test-beta/completion/init.lua
+++ b/test-beta/completion/init.lua
@@ -1065,6 +1065,51 @@ t.$
}
}
+TEST [[
+local t = {
+ ['a.b.c'] = {}
+}
+
+t. $
+]]
+{
+ {
+ label = 'a.b.c',
+ kind = CompletionItemKind.Field,
+ textEdit = {
+ start = 40,
+ finish = 39,
+ newText = '["a.b.c"]',
+ },
+ additionalTextEdits = {
+ {
+ start = 36,
+ finish = 36,
+ newText = '',
+ },
+ },
+ }
+}
+
+TEST [[
+local t = {
+ ['a.b.c'] = {}
+}
+
+t['$']
+]]
+{
+ {
+ label = 'a.b.c',
+ kind = CompletionItemKind.Field,
+ textEdit = {
+ start = 37,
+ finish = 36,
+ newText = 'a.b.c',
+ },
+ }
+}
+
-- TODO
do return end
TEST [[