Skip to content

Generate API from nvim_api_info #200

Description

@rhysd

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Effort

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions