Skip to content

Documentation: API luals Annotations And Help #3088

Closed

Description

@alex-courtis

api.lua exposes implementation details and does not contain all parameter and return types, notably nvim_tree.api.Node, which is currently defined in _meta/api.lua

Refactor api.lua to be an empty-function interface similar to /usr/share/nvim/runtime/lua/vim/lsp/diagnostic.lua and /usr/share/nvim/runtime/lua/vim/lsp/_meta/protocol.lua. /usr/share/nvim/runtime/lua/vim/_meta/api.lua is desirable, however that assumes that vim.api exists as a global i.e. not required.

See Api.decorator.UserDecorator for desired API shape.

A mechanism to hydrate the api with implementations must be built, so that the user may require it. There doesn't appear to be good prior art in other plugins; they link to implementations or stubs that confuse LSP.

See #2668

Activity

  1. alex-courtis commented on Mar 29, 2025

    @alex-courtis
    MemberAuthor

    Classes should also be exposed e.g. nvim_tree.api.DirectoryNode so that users may test type. See #3090 (reply in thread)

  2. changed the title [-]Annotated API _meta[/-] [+]Documentation: API luals Annotations[/+] on Jan 15, 2026
  3. alex-courtis commented on Jan 15, 2026

    @alex-courtis
    MemberAuthor

    Follows #2934

  4. changed the title [-]Documentation: API luals Annotations[/-] [+]Documentation: API luals Annotations And Help[/+] on Jan 15, 2026
  5. added
    documentation
    on Jan 15, 2026
  6. added 9 commits that reference this issue on Jan 16, 2026
  7. 64 remaining items

  8. added 4 commits that reference this issue on Jan 29, 2026
  9. added 7 commits that reference this issue on Jan 30, 2026
  10. added a commit that references this issue on Feb 12, 2026
  11. added a commit that references this issue on Feb 13, 2026
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

    APIdocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions