luttje / glua-api-snippets

Scrapes the Garry's Mod Wiki in order to build Lua Language Server comments that will provide IDE suggestions and autocompletion.
MIT License
18 stars 6 forks source link

Optional parameters #10

Closed Vurv78 closed 1 year ago

Vurv78 commented 1 year ago

Parameters with default values (ie Color(r, g, b, a = 255)) ignore the default values, leading to warnings with editors that enforce correct number of parameters to call a function (LuaLS, IntelliJ probably also makes this a warning)

luttje commented 1 year ago

Thanks for taking your time to contribute in this way. I greatly appreciate it!

I've got an idea where to implement this. Luckily the wiki has consistent formatting for this (from what I've seen). Sadly I'll implement default parameters as optional as well until this is implemented: https://github.com/LuaLS/lua-language-server/issues/1064

I'll do that later this week, leaving some time for more reports and then patching them all in new release.

Edit: sadly don't have time to pick this up as promised. Will try do this sometime in the coming month.