summaryrefslogtreecommitdiff
path: root/server/test/completion
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-18 17:41:22 +0800
committersumneko <sumneko@hotmail.com>2019-04-18 17:41:22 +0800
commit2539cf95fa286dd4ba3f68faf74d35c5aca2c874 (patch)
tree9f35b1e7dd8383ad2c5371e0ce9c229fc9bf31ce /server/test/completion
parentd138a03445f19238aa33901546e7033aca2eff33 (diff)
downloadlua-language-server-2539cf95fa286dd4ba3f68faf74d35c5aca2c874.zip
keyword也可以补全了
Diffstat (limited to 'server/test/completion')
-rw-r--r--server/test/completion/init.lua45
1 files changed, 25 insertions, 20 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua
index 383c7007..6dc998c7 100644
--- a/server/test/completion/init.lua
+++ b/server/test/completion/init.lua
@@ -770,26 +770,31 @@ t.$
}
}
---TEST [[
---local elseaaa
---if a then
---else$
---]]
---{
--- {
--- label = 'elseaaa',
--- kind = CompletionItemKind.Variable,
--- documentation = EXISTS,
--- },
--- {
--- label = 'else',
--- kind = CompletionItemKind.Keyword,
--- },
--- {
--- label = 'elseif',
--- kind = CompletionItemKind.Keyword,
--- }
---}
+TEST [[
+local elseaaa
+ELSE = 1
+if a then
+else$
+]]
+{
+ {
+ label = 'elseaaa',
+ kind = CompletionItemKind.Variable,
+ },
+ {
+ label = 'ELSE',
+ kind = CompletionItemKind.Enum,
+ detail = EXISTS,
+ },
+ {
+ label = 'else',
+ kind = CompletionItemKind.Keyword,
+ },
+ {
+ label = 'elseif',
+ kind = CompletionItemKind.Keyword,
+ }
+}
TEST [[
---@$