folke / lazydev.nvim

Faster LuaLS setup for Neovim
Apache License 2.0
717 stars 7 forks source link

feature: lazy.nvim spec integration #58

Closed WilliamHsieh closed 3 months ago

WilliamHsieh commented 3 months ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

currently it's possible to get type annotation through the traditional require("plugin").setup { opts } function call, however, when using lazy.nvim, most of the config are defined in plugins.opts, in this case, type annotation in opts are not provided.,

Describe the solution you'd like

support type annotation in lazy.nvim spec, particularly in the plugins.opts field.

Describe alternatives you've considered

use the traditional setup call in plugins.config

Additional context

No response

folke commented 3 months ago

Just add ---@module 'cmp' for example and then add a correct type annotation to the opts field.

WilliamHsieh commented 3 months ago

Cool! didn't realize it was intended to be used like this. Thank you very much.