diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-19 17:43:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-19 17:43:34 +0800 |
commit | 71244c2644abc5b4ecc9d3296f9bed99d4bee888 (patch) | |
tree | c2dc97ae119f014dc0e65c33213672b5b63c4858 /test | |
parent | bed0c4911969b521fa3c15158df273c7e6106882 (diff) | |
download | lua-language-server-71244c2644abc5b4ecc9d3296f9bed99d4bee888.zip |
close #384 completion supports interface
Diffstat (limited to 'test')
-rw-r--r-- | test/completion/init.lua | 45 |
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, + }, +} |