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: update luadoc to allow for empty setup call #187

Merged
merged 2 commits into from
Jun 2, 2024

Conversation

seanbreckenridge
Copy link
Contributor

Previously I get the following warning when using the default config (by passing nothing):

This function requires 1 argument(s) but instead it is receiving 0. Lua Diagnostics. (missing-parameter) [83, 8]

image

The code itself works fine, it will use the default config.

This PR just updates the expected argument for setup to allow for nil as well

@seanbreckenridge
Copy link
Contributor Author

fwiw, I had also considered adding a basic require('nvim-ts-autotag').setup({}) to fix the warning on my end, but that gives me a different warning:

     └╴W Missing required fields in type `nvim-ts-autotag.PluginSetup`: `did_setup` Lua Diagnostics. (missing-fields) [83, 41]

Copy link
Collaborator

@PriceHiller PriceHiller left a comment

Choose a reason for hiding this comment

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

Thanks for the PR 😄! Just a small change.

fwiw, I had also considered adding a basic require('nvim-ts-autotag').setup({}) to fix the warning on my end, but that gives me a different warning:

     └╴W Missing required fields in type `nvim-ts-autotag.PluginSetup`: `did_setup` Lua Diagnostics. (missing-fields) [83, 41]

That's a separate issue and screams that I've messed something up annotation wise. I'll take a look at this tomorrow as it's separate. Checking did_setup can be done a bit better I believe.

Don't worry about that though, that's my problem 🥲.

lua/nvim-ts-autotag/config/plugin.lua Outdated Show resolved Hide resolved
Co-authored-by: Price Hiller <[email protected]>
@PriceHiller
Copy link
Collaborator

Awesome, thanks again 😌

@PriceHiller PriceHiller merged commit 6eb4120 into windwp:main Jun 2, 2024
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