Add type annotations for lua API
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Expected behavior of the wanted feature
There is lua language server that provides a type annotation system called luacats.
I have generated it from the document myself before using some simple regex, see https://github.com/ofseed/mpv/blob/main/types/mp.lua.
It is useful if you write mpv scripts with the language server because you can auto-complete APIs provided by mpv or read the docs immediately by hovering, Here is the showcase:
If you are interested, I could write a more accurate script or github workflow using tree-sitter or python packages to generate it automated in this repository.
Alternative behavior of the wanted feature
- Provide these types in another repository.
- Write annotations directly and generate the
.rstfile from it.
Log File
No response
Sample Files
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing generated types/mp.lua example and the linked LuaLS/luacats annotation documentation, then compare it with the current mpv API documentation. Done means a repository-supported annotation source or generator is defined and the resulting Lua API types are available for language-server completion and hover documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100