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
Migrating from sumnekos LuaLS, I noticed a change in the way class documentation strings are handled.
For my meta libraries, I used to write code in a similar pattern like this:
--- This is the MyModule documentation.--- It should appear when hovering over MyModule.--- @classMyModuleMyModule= {}
--- This is the SubModule documentation.--- It should appear when hovering over SubModule.--- @classMyModule.SubModuleMyModule.SubModule= {}
--- Creates a new SubModule instance--- @returnMyModule.SubModulefunctionMyModule.SubModule.create()
endreturnMyModule
Using the Emmy LS, I now noticed that my documentation strings are not shown to the user when hovering over class usages.
To better showcase my issue, here is how the Emmy LS displays the hover message vs Sumnekos LuaLS:
Is there a way for me to adapt the format of my meta libraries to achieve a similar outcome to what I am used to?
Activity
CppCXY commentedon Feb 10, 2026
the comment will attach to class self, for module I suggest donot declare class
jllv commentedon Feb 10, 2026
Thanks for the quick reply!
I removed the
---@classannotation fromMyModule, which did indeed improve the Hover message when using theMyModuleclass.However, unless I misunderstood you, the problem with using
SubModulepersists.Since I want to keep the meta lib in the background, it would be nice to provide the descriptions also when using the SubModule.
fix(hover): show bound class docs for variable hovers