summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-21 10:48:00 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-21 10:48:00 +0800
commit18418c3a908a3608f52bf4a991f21508df74aa44 (patch)
treea83c3b49ad3e5570bc0d199e5dd86822ed89cf51 /script/provider/provider.lua
parentb87a61234cef1122089de943b946b1b6cb7c0d57 (diff)
downloadlua-language-server-18418c3a908a3608f52bf4a991f21508df74aa44.zip
hover: remove redundante trennlinien
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 10348fac..32778399 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -211,7 +211,10 @@ proto.on('textDocument/hover', function (params)
end
local md = markdown()
md:add('lua', hover.label)
- md:add('md', "---")
+ if hover.label and #hover.label > 0
+ and hover.description and #hover.description > 0 then
+ md:add('md', "---")
+ end
md:add('md', hover.description)
return {
contents = {