summaryrefslogtreecommitdiff
path: root/test/crossfile
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-02 19:20:22 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-02 19:20:22 +0800
commit02dd5b6557d3e70859bc3ddb234f8924b0166221 (patch)
tree85a2ff57dc31ba1586542e26bed014514754b089 /test/crossfile
parent63510ae7469aa1cf09da2c356a9feb2ce4be4cd7 (diff)
downloadlua-language-server-02dd5b6557d3e70859bc3ddb234f8924b0166221.zip
improve `---@see`
resolve #1344
Diffstat (limited to 'test/crossfile')
-rw-r--r--test/crossfile/hover.lua37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index 6d1f3df6..4a567a31 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -1644,3 +1644,40 @@ function f(x: number)
function f(x: number, y: number)
```]]
}
+
+TEST { {path = 'a.lua', content = [[
+---@class A
+
+---@see A # comment1
+local <?x?>
+]]},
+hover = [[
+```lua
+local x: unknown
+```
+
+---
+
+See: [A](file:///a.lua:1:10) comment1]]
+}
+
+TEST { {path = 'a.lua', content = [[
+---@class A
+
+TTT = 1
+
+---@see A # comment1
+---@see TTT # comment2
+local <?x?>
+]]},
+hover = [[
+```lua
+local x: unknown
+```
+
+---
+
+See:
+ * [A](file:///a.lua:1:10) comment1
+ * [TTT](file:///a.lua:3:0) comment2]]
+}