From 625f5be9a6ae1c30dd5821f1dd2485073d054209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 2 Nov 2022 17:29:18 +0800 Subject: `---@see` use workspace-symbol #1344 --- test/completion/common.lua | 12 ++++++++++++ test/crossfile/definition.lua | 1 + test/definition/init.lua | 1 + test/definition/luadoc.lua | 23 +++++++++++++++-------- 4 files changed, 29 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/completion/common.lua b/test/completion/common.lua index bf43a463..7266de16 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -3963,3 +3963,15 @@ t. kind = define.CompletionItemKind.Field, }, } + +TEST [[ +---@class ABCD + +---@see ABCD +]] +{ + { + label = 'ABCD', + kind = define.CompletionItemKind.Class, + }, +} diff --git a/test/crossfile/definition.lua b/test/crossfile/definition.lua index 45f21697..ef9b5240 100644 --- a/test/crossfile/definition.lua +++ b/test/crossfile/definition.lua @@ -26,6 +26,7 @@ local function founded(targets, results) return true end +---@async function TEST(datas) local targetList = {} local sourceList diff --git a/test/definition/init.lua b/test/definition/init.lua index 7e0a7989..eb6f1435 100644 --- a/test/definition/init.lua +++ b/test/definition/init.lua @@ -21,6 +21,7 @@ local function founded(targets, results) return true end +---@async function TEST(script) local newScript, catched = catch(script, '!?') diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua index c14e1242..d8da938e 100644 --- a/test/definition/luadoc.lua +++ b/test/definition/luadoc.lua @@ -207,23 +207,30 @@ y. ]] TEST [[ ----@class -local unit!> +---@class +local mt -function unit:pants() +function mt:f() end ----@see +---@see ]] TEST [[ ----@class loli -local unit +---@class A +local mt -function unit:() +function () end ----@see loli# +---@see +]] + +TEST [[ +AAA = {} + = 1 + +---@see ]] TEST [[ -- cgit v1.2.3