LSP icon indicating copy to clipboard operation
LSP copied to clipboard

Discuss removal of some APIs

Open predragnikolic opened this issue 9 months ago • 3 comments

Some API are not necessary anymore.

While this removal might not happen soon, I still wanted to give a heads up.

Client configuration

The following api will stay:

  • selector
  • priority_selector

The following will be deprecated and removed:

  • feature_selector
  • document_selector
  • languages
    • scopes
    • languageId
    • syntaxes

Each package that still uses the deprecated api will get an update to migrate to selector and priority_selector.

  • Remove view2scope - not used
  • Remove syntax2scope - not used
  • Remove default_clients in a non breaking way

predragnikolic avatar May 03 '24 10:05 predragnikolic

There is also uri_to_filename function from the API marked as deprecated for a long time. Maybe it can be removed? (probably better to check LSP-* packages first if it is used somewhere)

  • Remove default_clients in a non breaking way

How is this possible in a "non-breaking way"? I'm all for removing the default_clients (even if it would be breaking), but if someone used those configs, it would stop working for them, no? Or what am I missing?

jwortmann avatar May 03 '24 11:05 jwortmann

Remove default_clients in a non breaking way

I can add code to migrate the "default_clients" to users LSP.sublime-settings "clients" section. (in reality, it would require more code, I would need to merge the "clients" configuration to "default_clients" and then move it to "clients", but you get the point)

I would like to avoid people having to deal with breaking changes, unless they really have to... But that is just nice to have :) If we just delete the "default_clients" I would be fine with that, and people will be notified about that change in the release notes. Which is also OK.

predragnikolic avatar May 03 '24 12:05 predragnikolic

probably better to check LSP-* packages first if it is used somewhere

The easiest way to see if we are breaking a LSP-pacakge is by cloning https://github.com/sublimelsp/lsp_maintainers

Should help when doing breaking changes to see what plugins are affected.

Commands:

Preferences: LSP Maintainers Settings - configure what LSP-* will be cloned and included in the project. LSP Maintainers: Clone Projects - will clone the specified LSP-* plugins in the sublime package directory. LSP Maintainers: Open Projects - will open the those LSP-* plugins in the current window.

predragnikolic avatar May 03 '24 12:05 predragnikolic