node-client
node-client copied to clipboard
Generate API from `nvim_api_info`
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.
is this relevant?: https://github.com/neovim/node-client/blob/master/packages/neovim/bin/generate-typescript-interfaces.js
Is anybody working on this, or is it up for grabs?
@Cyberlane please feel free