summaryrefslogtreecommitdiff
path: root/test/completion/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/completion/init.lua')
-rw-r--r--test/completion/init.lua45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua
index 7f3476f8..01102632 100644
--- a/test/completion/init.lua
+++ b/test/completion/init.lua
@@ -2006,3 +2006,48 @@ TEST [[
kind = define.CompletionItemKind.Snippet,
}
}
+
+Cared['description'] = nil
+Cared['detail'] = nil
+TEST [[
+---@class cc
+---@field aaa number # a1
+---@field bbb number # a2
+
+---@param x cc
+local function f(x) end
+
+f({
+ $
+})
+]]
+{
+ {
+ label = 'aaa',
+ kind = define.CompletionItemKind.Property,
+ },
+ {
+ label = 'bbb',
+ kind = define.CompletionItemKind.Property,
+ },
+}
+
+TEST [[
+---@class cc
+---@field aaa number # a1
+---@field bbb number # a2
+
+---@param x cc
+local function f(x) end
+
+f({
+ aaa = 1,
+ $
+})
+]]
+{
+ {
+ label = 'bbb',
+ kind = define.CompletionItemKind.Property,
+ },
+}