summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vscode/settings.json6
m---------3rd/bee.lua0
m---------3rd/luamake0
-rw-r--r--script/core/hover/init.lua8
4 files changed, 12 insertions, 2 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 248a92a6..31b3626c 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -12,7 +12,8 @@
"DBGPORT",
"DBGWAIT",
"tracy",
- "LOCALE"
+ "LOCALE",
+ "SHOWSOURCE"
],
"Lua.diagnostics.disable": [
"close-non-object",
@@ -43,5 +44,6 @@
"?.lua",
"script/?.lua",
"script/?/init.lua"
- ]
+ ],
+ "Lua.misc.parameters": "--showsource=true"
}
diff --git a/3rd/bee.lua b/3rd/bee.lua
-Subproject cc6cc948e333aa04f6731a211d388b26dbd2b3b
+Subproject 96cdf4507f446890f7de56027f4af64563573f2
diff --git a/3rd/luamake b/3rd/luamake
-Subproject 8af194139b1b07a9c54c11db9751058856a1286
+Subproject daab23ce68378aa0b79090bfec80b304755e578
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