summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-10 15:15:00 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-10 15:15:00 +0800
commit0317157103c58c55035305e93db2bc3382f9d334 (patch)
treec95879dc83c4b63f3b63fe88091c60af09d7b2c8 /script
parent94d0a2b40dd7ea1aed8bd361461306053d40bb99 (diff)
parent24b3c06cd70050fc98e3946cfd343395d4f11ddf (diff)
downloadlua-language-server-0317157103c58c55035305e93db2bc3382f9d334.zip
Merge remote-tracking branch 'origin/master' into 2.0.0
Diffstat (limited to 'script')
-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