Skip to content

LuaLS autodoc is including global table in output md/json files #2977

Open
@Riddle1001

Description

@Riddle1001

How are you using the lua-language-server?

Command Line

Which OS are you using?

Windows

What is the issue affecting?

Other

Expected Behaviour

I expect to have only annotations defined with the lua file/directory be generated as docs

Actual Behaviour

The whole _G table is being generated as docs

Reproduction steps

Create a file test.lua with the contents of

---@class Car
---@field color table<number, number>
---@field engine string
local car = {
    color = { 255, 0, 0 },
    engine = "V8",
}

Run the command: ./lua-language-server.exe --doc "./test.lua" --doc_out_path .

Observe the output:
image

Additional Notes

I am using lua-language-server-3.13.2-win32-x64 that I downloaded on github from the releases file

Log File

file_c%3A_Users_test1_Desktop_lua-language-server-3.13.2-win32-x64_bin_test.lua.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions