Skip to content

Commit e39fba4

Browse files
committed
hover: tail comments may be cutted
1 parent e6e7a51 commit e39fba4

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# changelog
22

33
## 1.11.0
4+
* `CHG` completion: improve performance of workspace words
5+
* `FIX` hover: tail comments may be cutted
46
* `FIX` runtime errors
57

68
## 1.10.0

script/core/hover/description.lua

+5-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@ local function getBindComment(source, docGroup, base)
9494
continue = true
9595
lines = {}
9696
end
97-
lines[#lines+1] = doc.comment.text:sub(2)
97+
if doc.comment.text:sub(1, 1) == '-' then
98+
lines[#lines+1] = doc.comment.text:sub(2)
99+
else
100+
lines[#lines+1] = doc.comment.text
101+
end
98102
elseif doc == base then
99103
break
100104
else

test/hover/init.lua

+7
Original file line numberDiff line numberDiff line change
@@ -1510,3 +1510,10 @@ local v: C {
15101510
x: string,
15111511
}
15121512
]]
1513+
1514+
TEST [[
1515+
local <?x?>--测试
1516+
]]
1517+
[[
1518+
local x: any
1519+
]]

0 commit comments

Comments
 (0)