windwp / nvim-ts-autotag

Use treesitter to auto close and auto rename html tag
MIT License
1.54k stars 85 forks source link

fix: update luadoc to allow for empty setup call #187

Closed seanbreckenridge closed 1 month ago

seanbreckenridge commented 1 month ago

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 commented 1 month ago

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]
PriceHiller commented 1 month ago

Awesome, thanks again 😌