summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-27 15:25:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-27 15:25:34 +0800
commitdbf5509d3a8ee5525d95b4dcf0ddf4364a58e214 (patch)
tree7e920370040b271789731dc3c4c90c5069d57507 /test
parent79bf3e605d282cdbe425eea1b5793fc97d8404da (diff)
downloadlua-language-server-dbf5509d3a8ee5525d95b4dcf0ddf4364a58e214.zip
support tail comment of doc.param and doc.return
Diffstat (limited to 'test')
-rw-r--r--test/crossfile/hover.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index 1bfb81e6..edc029a2 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -440,3 +440,35 @@ function f(<?x?>) end
description = 'this is comment',
}
}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = '',
+ },
+ {
+ path = 'b.lua',
+ content = [[
+---@param x string this is comment
+---@param y table -- comment 1
+---@return boolean name #comment 2
+---@return number @comment 3
+function <?f?>(x, y) end
+ ]]
+ },
+ hover = {
+ label = [[
+function f(x: string, y: table)
+ -> name: boolean
+ 2. number]],
+ name = 'f',
+ description = [[
+@*param* `x` -- this is comment
+
+@*param* `y` -- comment 1
+
+@*return* `name` -- comment 2
+
+@*return* `#2` -- comment 3]],
+ }
+}