summaryrefslogtreecommitdiff
path: root/script/core/hover
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-04 19:37:55 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-04 19:37:55 +0800
commite74d75c40e5c1b3dff2454b70aafb38332cf8969 (patch)
treebefaad8b0bcf86a9fdc38162c28c994ebb85a7c5 /script/core/hover
parenta01ab28d27c8f4a61569d3058981b4d3cd43f7bb (diff)
downloadlua-language-server-e74d75c40e5c1b3dff2454b70aafb38332cf8969.zip
cleanup
Diffstat (limited to 'script/core/hover')
-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 d9fb2b6d..fb5f7cd5 100644
--- a/script/core/hover/init.lua
+++ b/script/core/hover/init.lua
@@ -137,10 +137,18 @@ local function getHoverByUri(uri, position)
local hover = getHover(source)
if SHOWSOURCE then
hover:splitLine()
+ hover:add('md', 'Source Info')
hover:add('lua', util.dump(source, {
deep = 1,
}))
end
+ if SHOWNODE then
+ hover:splitLine()
+ hover:add('md', 'Node Info')
+ hover:add('lua', util.dump(vm.compileNode(source), {
+ deep = 1,
+ }))
+ end
return hover, source
end