You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like ClientConfig to be fully typed. The types could be optional and default to Any.
It would be hard if not impossible to make existing implementation type friendly. Using the new plugin API it could look something like this where we specify config types within a generic of LspPlugin and PluginContext.
The problem with that is that the default value for the generic is only supported from python 3.13. Without it one would have to always specify generic explicitly (even if it's just Any).
Even with support for default value, we'd still likely need to create a replacement for ClientConfig so that we can properly type settings or any root setting not explicitly defined in ClientConfig (supported through the __getattr__ implementation).
Then there is also a question of whether anyone would have time and patience to define all the settings in TypedDict in addition to maintaining sublime_package.json and also ensure that those are in sync. For that we could potentially create some script but it would still have to be run to generate types.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like
ClientConfigto be fully typed. The types could be optional and default toAny.It would be hard if not impossible to make existing implementation type friendly. Using the new plugin API it could look something like this where we specify config types within a generic of
LspPluginandPluginContext.The problem with that is that the default value for the generic is only supported from python 3.13. Without it one would have to always specify generic explicitly (even if it's just
Any).Even with support for default value, we'd still likely need to create a replacement for
ClientConfigso that we can properly typesettingsor any root setting not explicitly defined inClientConfig(supported through the__getattr__implementation).Then there is also a question of whether anyone would have time and patience to define all the settings in
TypedDictin addition to maintainingsublime_package.jsonand also ensure that those are in sync. For that we could potentially create some script but it would still have to be run to generate types.Beta Was this translation helpful? Give feedback.
All reactions