summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 = {