Skip to content

Add Lua Reference manual for global functions #32

Open
@FourierTransformer

Description

Right now as you type functions from the global scope (ex: math.random) Teal is only aware of the types in use and not any of the function arguments. If we can marry up the types definitions with the functions from the reference manual we could provide argument information as well as documentation support while doing function signature completion.

It looks like there are ~145 @LibEntry in the manual.of file linked above. So sort've a fair amount. I feel like ideally, we could have a script that pulls them out, formats it as a table, and include that in the language server so that it can easily be referenced when resolving the function signature.

Manually is also reasonable. We're only in the low hundreds and not the thousands, and I don't think the Lua stdlib is changing too drastically.

I think before embarking on pulling out the data, figuring out the best way to reference it from inside the function signature formatting code would be good, so we can create data structures that play nicely.

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions