Skip to content

feat(api): add public API module #1432

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

Merged
merged 1 commit into from
Jul 25, 2022
Merged

feat(api): add public API module #1432

merged 1 commit into from
Jul 25, 2022

Conversation

kyazdani42
Copy link
Member

@kyazdani42 kyazdani42 commented Jul 17, 2022

before #1424
This PR adds an api.lua module.

We should document the API, since it will be the only place we will allow users to import from, so we can be more flexible in our internal design changes.

We will also start changing the events API, to be more concise, and we'll add migration steps on a followup PR. This is non breaking, older apis will still work. We'll add a PR to be able to .subscribe.EventName(handle) with an index check.

This will also allow refactoring the actions to the on_attach method.

TODO:

  • reviewed & discussed / agreed upon
  • documented

@kyazdani42 kyazdani42 requested a review from alex-courtis July 17, 2022 07:58
Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good. With doc we can release this today and users can start immediately.

@kyazdani42 kyazdani42 force-pushed the feat/add-api-module branch from 345cc4c to d0aa124 Compare July 18, 2022 08:56
@kyazdani42
Copy link
Member Author

@alex-courtis i'll finish migrating the events documentation in a followup PR.
I'm not sure about the format for the documentation, tell me if you have suggestions.

@kyazdani42 kyazdani42 requested a review from alex-courtis July 18, 2022 08:57
@kyazdani42 kyazdani42 force-pushed the feat/add-api-module branch from d0aa124 to e8ff1b6 Compare July 18, 2022 08:58
@alex-courtis
Copy link
Member

I'm not sure about the format for the documentation, tell me if you have suggestions.

Documentation is fine for now; there's enough information there. We can update it over time.

When we add and document the new mappings / on_attach it will become a lot clearer as the users will be able to see real usages of the API.

@kyazdani42 kyazdani42 force-pushed the feat/add-api-module branch from e8ff1b6 to 0fd1f6e Compare July 19, 2022 09:48
@kyazdani42 kyazdani42 requested a review from alex-courtis July 19, 2022 09:48
Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very clean. Time to merge and use.

@kyazdani42 kyazdani42 merged commit e783278 into master Jul 25, 2022
@kyazdani42 kyazdani42 deleted the feat/add-api-module branch July 25, 2022 09:11
Almo7aya pushed a commit to Almo7aya/nvim-tree.lua that referenced this pull request Oct 11, 2022
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

Successfully merging this pull request may close these issues.

2 participants