summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
Diffstat (limited to 'script/core')
-rw-r--r--script/core/hover/init.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/script/core/hover/init.lua b/script/core/hover/init.lua
index ea86f785..5dd00c43 100644
--- a/script/core/hover/init.lua
+++ b/script/core/hover/init.lua
@@ -156,6 +156,14 @@ local function getHoverByUri(uri, offset)
return nil
end
local hover = getHover(source)
+ if SHOWSOURCE then
+ hover.description = ('%s\n---\n\n```lua\n%s\n```'):format(
+ hover.description or '',
+ util.dump(source, {
+ deep = 1,
+ })
+ )
+ end
return hover
end