Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Lua Reference manual for global functions #32

Open
FourierTransformer opened this issue Nov 30, 2024 · 0 comments
Open

Add Lua Reference manual for global functions #32

FourierTransformer opened this issue Nov 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@FourierTransformer
Copy link
Collaborator

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.

@FourierTransformer FourierTransformer added the enhancement New feature or request label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant