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

Generate API from nvim_api_info #200

Open
rhysd opened this issue Oct 13, 2022 · 3 comments
Open

Generate API from nvim_api_info #200

rhysd opened this issue Oct 13, 2022 · 3 comments

Comments

@rhysd
Copy link
Member

rhysd commented Oct 13, 2022

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 Array in API info and its element type is unknown
  • Naming convention of function names and property names are different. TypeScript (and JavaScript) adopts lowerCamel and Neovim API adopts snake_case. I'd like to convert them to provide natural APIs for TypeScript and JavaScript users.
@justinmk
Copy link
Member

@Cyberlane

This comment was marked as outdated.

@justinmk

This comment was marked as outdated.

@justinmk justinmk changed the title Generate API from output of nvim_api_info Generate API from nvim_api_info Jan 29, 2024
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

No branches or pull requests

3 participants