LSP icon indicating copy to clipboard operation
LSP copied to clipboard

Expose ClientConfig in more places in the Plugin API

Open rchl opened this issue 3 years ago • 0 comments

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

In PRs like https://github.com/sublimelsp/LSP-rust-analyzer/pull/71 people add new settings to be used within the package's plugin (rather than by the server itself) and then read the settings using sublime.load_settings. The problem with that is that this creates inconsistency as normally settings are overrideable from project settings but it's not the case when manually loading settings.

Describe the solution you'd like

Provide resolved ClientConfig in more AbstractPlugin methods like needs_update_or_installation, install_or_update, additional_variables.

Describe alternatives you've considered

sublime.load_settings

Additional context

Adding new arguments to APIs would be a breaking change so not ideal. Maybe if we decide to break compatibility we can also make the API more future-proof by passing a single object with multiple properties to API calls rather than individual arguments. Then new properties can be added without breaking compatibility.

rchl avatar Sep 01 '22 18:09 rchl