hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
7.9k stars 394 forks source link

Mark ConfigSchema fields as optional to prevent LSP warnings #1694

Closed HNegus closed 10 months ago

HNegus commented 1 year ago

The Lua Language Server will show a warning when calling cmp.setup because the table fields are not marked as optional.

wookayin commented 1 year ago

Then all the internal codes that depend on cmp.ConfigSchema should do (unnecessary) nil check, right? I think a better solution might be have a different type than cmp.ConfigSchema that is used for cmp.setup only.

HNegus commented 1 year ago

I believe the type is used in just a few places, so wouldn't the impact be very limited?

hrsh7th commented 10 months ago

Sorry. I'd merged another PR. Thank you.

wookayin commented 10 months ago

Fixed in #1723