summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-05-07 15:28:37 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-05-07 15:28:37 +0800
commit6c0fc0d438154f2164e10674f5c1a4b983382039 (patch)
treecf748ea6a036c6d52046988dabec9e5db62c93ec
parentd948291c63ea17804b37bd4e3e5f123ac63730d9 (diff)
downloadlua-language-server-6c0fc0d438154f2164e10674f5c1a4b983382039.zip
stash
-rw-r--r--script/core/completion.lua2
-rw-r--r--test/completion/init.lua20
2 files changed, 16 insertions, 6 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua
index bab0f452..624ea0a6 100644
--- a/script/core/completion.lua
+++ b/script/core/completion.lua
@@ -254,7 +254,7 @@ end
local function getParams(func, oop)
if not func.args then
- return ''
+ return '()'
end
local args = {}
for _, arg in ipairs(func.args) do
diff --git a/test/completion/init.lua b/test/completion/init.lua
index ebdac49a..ad60b538 100644
--- a/test/completion/init.lua
+++ b/test/completion/init.lua
@@ -1226,6 +1226,16 @@ loadstring$
label = 'loadstring()',
kind = define.CompletionItemKind.Snippet,
},
+ {
+ label = 'loadstring(text, chunkname)',
+ deprecated = true,
+ kind = define.CompletionItemKind.Function,
+ },
+ {
+ label = 'loadstring(text, chunkname)',
+ deprecated = true,
+ kind = define.CompletionItemKind.Snippet,
+ },
}
TEST [[
@@ -1233,12 +1243,12 @@ debug.setcsta$
]]
{
{
- label = 'setcstacklimit',
+ label = 'setcstacklimit(limit)',
kind = define.CompletionItemKind.Function,
deprecated = true,
},
{
- label = 'setcstacklimit()',
+ label = 'setcstacklimit(limit)',
kind = define.CompletionItemKind.Snippet,
deprecated = true,
},
@@ -1777,11 +1787,11 @@ zzz$
]]
{
{
- label = 'zzzzz',
+ label = 'zzzzz(list, sep, i, j)',
kind = define.CompletionItemKind.Function,
},
{
- label = 'zzzzz()',
+ label = 'zzzzz(list, sep, i, j)',
kind = define.CompletionItemKind.Snippet,
insertText = EXISTS,
}
@@ -2260,7 +2270,7 @@ end
m.f$
]]{
{
- label = "f",
+ label = "f()",
kind = define.CompletionItemKind.Function,
},
{