Generate API from `nvim_api_info`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 537
- Forks
- 57
- Avg merge
- 1h 6m
- Merged PRs (30d)
- 6
Description
This issue was derived from #199.
Since we don't have sufficient velocity to follow the API changes and additions of Neovim, some APIs are missing in this package. And some APIs may be outdated (e.g. lack of some optional parameters).
To keep API of this package following to the latest Neovim, generating methods of Neovim, Buffer, Window, and Tabpage from the output of nvim_api_info would be great. Then we can run the code generation on CI regularly.
Currently I'm seeing some points which we would need to handle between TypeScript API and Neovim API.
- Some parameter types are not enough to define strict type definition in TypeScript. For example, an array parameter is just typed as
Arrayin API info and its element type is unknown - Naming convention of function names and property names are different. TypeScript (and JavaScript) adopts
lowerCameland Neovim API adoptssnake_case. I'd like to convert them to provide natural APIs for TypeScript and JavaScript users.
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 by inspecting the current Neovim, Buffer, Window, and Tabpage API definitions and the output of nvim_api_info. Map how API types and snake_case names would become TypeScript types and lowerCamel names, including array elements and optional parameters. Done means these methods are generated consistently and the generation can run regularly on CI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100