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

fix(types): add varargs to hook callback annotations #45

Merged
merged 1 commit into from
Dec 10, 2023

Conversation

willothy
Copy link
Contributor

Noticed that add_hook/remove_hook cause lua-ls to complain about redundant arguments because they're marked as fun(). This PR adds vararg annotations to those functions to silence the warnings.

Copy link
Owner

@stevearc stevearc left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

Copy link
Owner

@stevearc stevearc left a comment

Choose a reason for hiding this comment

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

Oh actually this is causing a build failure because I'm using a custom type annotation parser for the purposes of documentation generation, and it doesn't have support for that syntax. You could try using ...: any and see if that works?

@willothy
Copy link
Contributor Author

willothy commented Dec 4, 2023

Oh actually this is causing a build failure because I'm using a custom type annotation parser for the purposes of documentation generation, and it doesn't have support for that syntax. You could try using ...: any and see if that works?

Sure, I'll make that change tomorrow and see if that works.

@willothy
Copy link
Contributor Author

willothy commented Dec 8, 2023

Hmm not really sure how to make this work, should I just close this? I don't know much about the pynvim doc generation stuff

@stevearc
Copy link
Owner

Nah, I just needed to do a quick fix to nvim_doc_tools. Thanks!

@stevearc stevearc merged commit c359b89 into stevearc:master Dec 10, 2023
7 checks passed
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