summaryrefslogtreecommitdiff
path: root/test-beta/completion/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-12 19:52:20 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-12 19:52:20 +0800
commite2cd0ad08fdb756f251e3def4a4277d22ba54728 (patch)
treec3861e9c083f64f0bb6a9b5f34868fe185bcc9b9 /test-beta/completion/init.lua
parentf1362652b7c45f05690369f2c9d3ef3d38ab2f7f (diff)
downloadlua-language-server-e2cd0ad08fdb756f251e3def4a4277d22ba54728.zip
更新自动完成
Diffstat (limited to 'test-beta/completion/init.lua')
-rw-r--r--test-beta/completion/init.lua53
1 files changed, 43 insertions, 10 deletions
diff --git a/test-beta/completion/init.lua b/test-beta/completion/init.lua
index 20fd01cf..0d1db3fe 100644
--- a/test-beta/completion/init.lua
+++ b/test-beta/completion/init.lua
@@ -1296,9 +1296,38 @@ end
label = 'a, b, c',
kind = define.CompletionItemKind.Snippet,
insertText = [[
-a any
----@param b any
----@param c any]]
+a ${1:any}
+---@param b ${2:any}
+---@param c ${0:any}]]
+ },
+ {
+ label = 'a',
+ kind = define.CompletionItemKind.Interface,
+ },
+ {
+ label = 'b',
+ kind = define.CompletionItemKind.Interface,
+ },
+ {
+ label = 'c',
+ kind = define.CompletionItemKind.Interface,
+ },
+}
+
+TEST [[
+---@param $
+function f(a, b, c) end
+
+function f2(a) end
+]]
+{
+ {
+ label = 'a, b, c',
+ kind = define.CompletionItemKind.Snippet,
+ insertText = [[
+a ${1:any}
+---@param b ${2:any}
+---@param c ${0:any}]]
},
{
label = 'a',
@@ -1338,9 +1367,9 @@ end
label = 'a, b, c',
kind = define.CompletionItemKind.Snippet,
insertText = [[
-a any
----@param b any
----@param c any]]
+a ${1:any}
+---@param b ${2:any}
+---@param c ${0:any}]]
},
{
label = 'a',
@@ -1366,9 +1395,9 @@ end
label = 'a, b, c',
kind = define.CompletionItemKind.Snippet,
insertText = [[
-a any
----@param b any
----@param c any]]
+a ${1:any}
+---@param b ${2:any}
+---@param c ${0:any}]]
},
{
label = 'a',
@@ -1464,7 +1493,11 @@ end
{
label = 'return',
kind = define.CompletionItemKind.Event,
- }
+ },
+ {
+ label = 'deprecated',
+ kind = define.CompletionItemKind.Event,
+ },
}
TEST [[