You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---This is a modulelocalM= {}
---This is a functionfunctionM.foo()
end---This is another functionfunctionM.bar()
endreturnM
When I do it like this, foo and bar get their doc comment shown in the hover docs - but not in the generated JSON/Markdown documentation. The module itself does not even get its docstring to appear in the hover docs.
It'd be nice if we could somehow annotate that M is a module and have it appear as such in the hover docs and the generated JSON/Markdown documentation. It does when I make it a ---@class - but it's not a class and should not be treated as a class. ---@module is already taken for a different purpose, but maybe ---@mod (like in lemmy-help) or ---@library?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Lua modules can be created using:
When I do it like this,
foo
andbar
get their doc comment shown in the hover docs - but not in the generated JSON/Markdown documentation. The module itself does not even get its docstring to appear in the hover docs.It'd be nice if we could somehow annotate that
M
is a module and have it appear as such in the hover docs and the generated JSON/Markdown documentation. It does when I make it a---@class
- but it's not a class and should not be treated as a class.---@module
is already taken for a different purpose, but maybe---@mod
(like in lemmy-help) or---@library
?Beta Was this translation helpful? Give feedback.
All reactions