summaryrefslogtreecommitdiff
path: root/script/core/hover
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-05 11:47:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-05 11:47:27 +0800
commite39fba474ab432265c9af4a66e2a1764cd0ca1d3 (patch)
tree8a87de2a2d09ea2bebc4e5d1ce6a947a480202c3 /script/core/hover
parente6e7a510cc8a34be73c82d26f7313af5fc187748 (diff)
downloadlua-language-server-e39fba474ab432265c9af4a66e2a1764cd0ca1d3.zip
hover: tail comments may be cutted
Diffstat (limited to 'script/core/hover')
-rw-r--r--script/core/hover/description.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua
index 570dec3f..cd24b013 100644
--- a/script/core/hover/description.lua
+++ b/script/core/hover/description.lua
@@ -94,7 +94,11 @@ local function getBindComment(source, docGroup, base)
continue = true
lines = {}
end
- lines[#lines+1] = doc.comment.text:sub(2)
+ if doc.comment.text:sub(1, 1) == '-' then
+ lines[#lines+1] = doc.comment.text:sub(2)
+ else
+ lines[#lines+1] = doc.comment.text
+ end
elseif doc == base then
break
else