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

Update OpenResty typedefs, annotations, and configuration #873

Merged
merged 12 commits into from
Dec 22, 2021
Merged

Update OpenResty typedefs, annotations, and configuration #873

merged 12 commits into from
Dec 22, 2021

Conversation

flrgh
Copy link
Contributor

@flrgh flrgh commented Dec 22, 2021

This is a continuation of the work I started for updating OpenResty library types. I've split it up into separate commits, but it's still a pretty large changeset. Let me know if I need to re-structure the commits to make things easier for review+merge.

Most of the changes here are as such:

  • Adding missing annotations, typedefs, and docstrings to many files
  • Cleanup of the global namespace by ensuring that module tables are local-ized
  • Cleanup of excessively namespaced variable names so that hover/help text is more concise

I did a lot of editing to ngx.lua in particular:

  • Remove extraneous markdown cruft from function docstrings
  • Reorganize contents for easier editing (group similar functions and fields together)
  • Added some helper enum-like aliases (ngx.log.level/ngx.http.method/ngx.http.status_code)

I also updated the config.lua file for OpenResty:

  • Added new file and word matchers
  • Added ngx as a global var (not sure if this is necessary)

I haven't applied these efforts to all files yet, so there is still much work to be done to make the OpenResty typedefs awesome, but I think this is good progress :)

@sumneko
Copy link
Collaborator

sumneko commented Dec 22, 2021

No problem, thanks for your work!

@sumneko sumneko merged commit 315cba6 into LuaLS:master Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants