summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-09 15:16:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-09 15:16:49 +0800
commite32f17eb3cb4b98960f1f048bae654e43cf95984 (patch)
treeab487196b3ef6366b2eb1adcff36daef0d79f956 /test
parent05d9e522a839460d713fe942f985392e6b9d6602 (diff)
downloadlua-language-server-e32f17eb3cb4b98960f1f048bae654e43cf95984.zip
fix completion: incorrect callback
Diffstat (limited to 'test')
-rw-r--r--test/completion/init.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua
index 327d72a4..9b1c55c1 100644
--- a/test/completion/init.lua
+++ b/test/completion/init.lua
@@ -2588,3 +2588,29 @@ t.GGG$
kind = define.CompletionItemKind.Function,
},
}
+
+TEST [[
+---@param f fun(a: any, b: any):boolean
+local function f(f) end
+
+f(fun$)
+]]
+{
+ {
+ label = 'fun(a: any, b: any):boolean',
+ kind = define.CompletionItemKind.Function,
+ textEdit = {
+ newText = 'function (${1:a}, ${2:b})\n\t$0\nend',
+ start = 68,
+ finish = 70,
+ }
+ },
+ {
+ label = 'function',
+ kind = define.CompletionItemKind.Keyword,
+ },
+ {
+ label = 'function ()',
+ kind = define.CompletionItemKind.Snippet,
+ }
+}