summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-25 21:01:20 +0800
committersumneko <sumneko@hotmail.com>2019-04-25 21:01:20 +0800
commitd467b51cf4ce3b405fe131ddd75a6844e17797f3 (patch)
treebe33a3067862e7da605c3f9cafddc9e39f7ab787 /server/test
parent3391ab935f18e928da414c19a84e7afc4acee779 (diff)
downloadlua-language-server-d467b51cf4ce3b405fe131ddd75a6844e17797f3.zip
参数自动完成
Diffstat (limited to 'server/test')
-rw-r--r--server/test/completion/init.lua46
1 files changed, 45 insertions, 1 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua
index 60e197bc..aa310d30 100644
--- a/server/test/completion/init.lua
+++ b/server/test/completion/init.lua
@@ -850,7 +850,7 @@ end
]]
{
{
- label = '(a, b, c)',
+ label = 'a, b, c',
kind = CompletionItemKind.Snippet,
insertText = [[
a any
@@ -878,6 +878,50 @@ function f(x$)
]]
{
{
+ label = 'xyz, xxx',
+ kind = CompletionItemKind.Snippet,
+ },
+ {
+ label = 'xyz',
+ kind = CompletionItemKind.Interface,
+ },
+ {
+ label = 'xxx',
+ kind = CompletionItemKind.Interface,
+ },
+}
+
+TEST [[
+---@param xyz Class
+---@param xxx Class
+function f($
+]]
+{
+ {
+ label = 'xyz, xxx',
+ kind = CompletionItemKind.Snippet,
+ },
+ {
+ label = 'xyz',
+ kind = CompletionItemKind.Interface,
+ },
+ {
+ label = 'xxx',
+ kind = CompletionItemKind.Interface,
+ },
+}
+
+TEST [[
+---@param xyz Class
+---@param xxx Class
+function f($)
+]]
+{
+ {
+ label = 'xyz, xxx',
+ kind = CompletionItemKind.Snippet,
+ },
+ {
label = 'xyz',
kind = CompletionItemKind.Interface,
},