summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-13 18:09:36 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-13 18:09:36 +0800
commit3b9bde4ea1eb4a71a84dad9f62595b4360d7aa4e (patch)
tree637647129718b93ab9b7c524567fdf0d2a85acac /test
parent6592c2cee8ff1649d6e303d1fb79c221021fca88 (diff)
downloadlua-language-server-3b9bde4ea1eb4a71a84dad9f62595b4360d7aa4e.zip
completion: support delegate
Diffstat (limited to 'test')
-rw-r--r--test/completion/init.lua32
1 files changed, 18 insertions, 14 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua
index 6e0faf60..662df84e 100644
--- a/test/completion/init.lua
+++ b/test/completion/init.lua
@@ -1953,17 +1953,21 @@ vvv$
},
}
---TEST [[
------@param callback fun(x: number, y: number):string
---local function f(callback)
---
---f($)
---]]
---{
--- {
--- label = 'fun(x: number, y: number):string',
--- detail = 'function',
--- kind = define.CompletionItemKind.Function,
--- description = EXISTS,
--- },
---}
+Cared['insertText'] = true
+TEST [[
+---@param callback fun(x: number, y: number):string
+local function f(callback) end
+
+f($)
+]]
+{
+ {
+ label = 'fun(x: number, y: number):string',
+ kind = define.CompletionItemKind.Function,
+ insertText = [[
+function (${1:x}, ${2:y})
+ $0
+end]],
+ },
+}
+Cared['insertText'] = nil