diff options
author | actboy168 <actboy168@gmail.com> | 2020-12-03 01:11:47 +0800 |
---|---|---|
committer | actboy168 <actboy168@gmail.com> | 2020-12-03 01:12:26 +0800 |
commit | 0f168c4bf45f5f3b70dd2bcf779a945a29a3fdd9 (patch) | |
tree | d14f007436c9f7a8c4cfef6406f21460f3f4ffd2 /test | |
parent | 37f95b72a8a18b9c4923bc6ef45d77bf55ba3e06 (diff) | |
download | lua-language-server-0f168c4bf45f5f3b70dd2bcf779a945a29a3fdd9.zip |
hover增加分割线
Diffstat (limited to 'test')
-rw-r--r-- | test/completion/init.lua | 2 | ||||
-rw-r--r-- | test/crossfile/hover.lua | 26 |
2 files changed, 21 insertions, 7 deletions
diff --git a/test/completion/init.lua b/test/completion/init.lua index 56046645..1377f922 100644 --- a/test/completion/init.lua +++ b/test/completion/init.lua @@ -1748,6 +1748,8 @@ zz$ ```lua global zzz: integer = 1 ``` +--- + abc]], } } diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index f7a04d14..9259b593 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -287,7 +287,10 @@ TEST { hover = { label = [[function f(x: number)]], name = 'f', - description = ' abc', + description = [[ +--- + + abc]], args = EXISTS, } } @@ -307,7 +310,10 @@ TEST { hover = { label = [[global x: integer = 1]], name = 'x', - description = ' abc', + description = [[ +--- + + abc]], } } @@ -329,6 +335,7 @@ TEST { label = "function f(x: string|'选项1'|'选项2')", name = 'f', description = [[ +--- ```lua x: string | '选项1' -- 注释1 @@ -356,6 +363,7 @@ TEST { label = "function f(x: '选项1'|'选项2')", name = 'f', description = [[ +--- ```lua x: option | '选项1' -- 注释1 @@ -385,6 +393,7 @@ function f() -> x: '选项1'|'选项2']], name = 'f', description = [[ +--- ```lua x: option | '选项1' -- 注释1 @@ -414,6 +423,7 @@ function f() -> '选项1'|'选项2']], name = 'f', description = [[ +--- ```lua return #1: option | '选项1' -- 注释1 @@ -463,13 +473,15 @@ function f(x: string, y: table) 2. number]], name = 'f', description = [[ -@*param* `x` -- this is comment +--- + +@*param* `x` — this is comment -@*param* `y` -- comment 1 +@*param* `y` — comment 1 -@*return* `name` -- comment 2 +@*return* `name` — comment 2 -@*return* `#2` -- comment 3]], +@*return* `#2` — comment 3]], } } @@ -490,6 +502,6 @@ function f(<?x?>) end hover = { label = [[local x: string]], name = 'x', - description = '', + description = nil, } } |