Skip to content

Missing class documentation #956

Closed

Description

@jllv

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.
--- @class MyModule
MyModule = {}


--- This is the SubModule documentation.
--- It should appear when hovering over SubModule.
--- @class MyModule.SubModule
MyModule.SubModule = {}

--- Creates a new SubModule instance
--- @return MyModule.SubModule
function MyModule.SubModule.create()
end

return MyModule

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:

image

image

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

  1. CppCXY commented on Feb 10, 2026

    @CppCXY
    Member
    Image

    the comment will attach to class self, for module I suggest donot declare class

  2. jllv commented on Feb 10, 2026

    @jllv
    Author

    Thanks for the quick reply!

    I removed the ---@class annotation from MyModule, which did indeed improve the Hover message when using the MyModule class.

    image

    However, unless I misunderstood you, the problem with using SubModule persists.

    image

    Since I want to keep the meta lib in the background, it would be nice to provide the descriptions also when using the SubModule.

  3. added theissue type on Feb 10, 2026
  4. self-assigned this
    on Jun 19, 2026
  5. added a commit that references this issue on Jun 19, 2026
    bd401f0
  6. linked a pull request that will close this issueupdate #1113on Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions