summaryrefslogtreecommitdiff
path: root/server/test/completion
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-28 21:39:29 +0800
committersumneko <sumneko@hotmail.com>2019-04-28 21:39:29 +0800
commitc33348a12256d6f8cff17960f037d9615c002276 (patch)
treed7447d4ab8f45ac5ae4edf6b47bd4a436c00605d /server/test/completion
parent2793fe8003d10c5d7db54a63f3e6140ce305fb92 (diff)
downloadlua-language-server-c33348a12256d6f8cff17960f037d9615c002276.zip
修正关键字有时捕获不到的bug
Diffstat (limited to 'server/test/completion')
-rw-r--r--server/test/completion/init.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua
index 7d0d1d04..17ab0369 100644
--- a/server/test/completion/init.lua
+++ b/server/test/completion/init.lua
@@ -1028,3 +1028,30 @@ mt.$
kind = CompletionItemKind.Field,
},
}
+
+TEST [[
+local function f()
+ if a then
+ else$
+end
+]]
+{
+ {
+ label = 'select',
+ kind = CompletionItemKind.Function,
+ documentation = EXISTS,
+ },
+ {
+ label = 'setmetatable',
+ kind = CompletionItemKind.Function,
+ documentation = EXISTS,
+ },
+ {
+ label = 'else',
+ kind = CompletionItemKind.Keyword,
+ },
+ {
+ label = 'elseif',
+ kind = CompletionItemKind.Keyword,
+ },
+}