diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-25 21:01:20 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-25 21:01:20 +0800 |
commit | d467b51cf4ce3b405fe131ddd75a6844e17797f3 (patch) | |
tree | be33a3067862e7da605c3f9cafddc9e39f7ab787 /server/test | |
parent | 3391ab935f18e928da414c19a84e7afc4acee779 (diff) | |
download | lua-language-server-d467b51cf4ce3b405fe131ddd75a6844e17797f3.zip |
参数自动完成
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/completion/init.lua | 46 |
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, }, |