summaryrefslogtreecommitdiff
path: root/script-beta/core/hover/description.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/core/hover/description.lua')
-rw-r--r--script-beta/core/hover/description.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/script-beta/core/hover/description.lua b/script-beta/core/hover/description.lua
index ae33e133..e84fc3f3 100644
--- a/script-beta/core/hover/description.lua
+++ b/script-beta/core/hover/description.lua
@@ -39,8 +39,17 @@ local function asString(source)
end
end
+local function tryLibrary(source)
+ local lib = vm.getLibrary(source)
+ if not lib then
+ return
+ end
+ return lib.description
+end
+
return function (source)
if source.type == 'string' then
return asString(source)
end
+ return tryLibrary(source)
end