summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-03-09 11:49:56 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-03-09 11:49:56 +0800
commit7216de291958147471f28d34f46104fea4250b8d (patch)
tree1bf53ca98731ebaf2eb9b9d043b62a7d7f03b36a /test/completion
parent0748f983c77d6e133959891823ee1c338d3deee9 (diff)
downloadlua-language-server-7216de291958147471f28d34f46104fea4250b8d.zip
#420 provide `then .. end` snippet
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/init.lua47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua
index 930bc92f..d9e07b6f 100644
--- a/test/completion/init.lua
+++ b/test/completion/init.lua
@@ -2225,3 +2225,50 @@ m.f$
},
}
Cared['insertText'] = nil
+
+TEST [[
+if true then$
+]]
+{
+ {
+ label = 'then',
+ kind = define.CompletionItemKind.Keyword,
+ },
+ {
+ label = 'then .. end',
+ kind = define.CompletionItemKind.Snippet,
+ }
+}
+
+TEST [[
+if true then$
+end
+]]
+{
+ {
+ label = 'then',
+ kind = define.CompletionItemKind.Keyword,
+ },
+}
+
+TEST [[
+if true then$
+else
+]]
+{
+ {
+ label = 'then',
+ kind = define.CompletionItemKind.Keyword,
+ },
+}
+
+TEST [[
+if true then$
+elseif
+]]
+{
+ {
+ label = 'then',
+ kind = define.CompletionItemKind.Keyword,
+ },
+}