Repository navigation
Introduce LspPlugin API - #2739
Merged
Merged
Conversation
rchl
force-pushed
the
feat/new-plugin-api
branch
from
January 27, 2026 08:07
c8f89be to
f1b0dee
Compare
Member
Author
|
Actually just dumped some old code that I had in stash. |
rchl
commented
Jan 27, 2026
This comment was marked as resolved.
This comment was marked as resolved.
rchl
commented
Jan 28, 2026
rchl
marked this pull request as draft
January 30, 2026 08:42
rchl
force-pushed
the
main
branch
2 times, most recently
from
February 4, 2026 22:22
f806ca0 to
90081a4
Compare
rchl
commented
Feb 11, 2026
rchl
commented
Feb 13, 2026
rchl
commented
Apr 25, 2026
rchl
commented
Apr 25, 2026
jwortmann
reviewed
Apr 26, 2026
jwortmann
reviewed
Apr 26, 2026
Co-authored-by: ΠΡΠ΅Π΄ΡΠ°Π³ ΠΠΈΠΊΠΎΠ»ΠΈΡ <idmpepe@gmail.com>
Co-authored-by: ΠΡΠ΅Π΄ΡΠ°Π³ ΠΠΈΠΊΠΎΠ»ΠΈΡ <idmpepe@gmail.com>
Member
Author
|
@predragnikolic all looks good to you? |
Member
|
Yes. |
predragnikolic
approved these changes
Apr 28, 2026
predragnikolic
left a comment
Member
There was a problem hiding this comment.
left 2 comments and an approve :)
rwols
reviewed
May 2, 2026
| # Handle it now and use fake request ID since it shouldn't matter. | ||
| self._plugin.on_server_response_async('initialize', Response(-1, result)) | ||
| if issubclass(self._plugin_class, AbstractPlugin): | ||
| self._plugin = self._plugin_class(weakref.ref(self)) |
Member
There was a problem hiding this comment.
Why do we create a plugin instance here once again? Oh. Because it's AbstractPlugin. And the other one is LspPlugin. OK :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"Introduce new plugin API" is a little over the top. I just wanted to jump-start it with one new method to allow for progressive enhancement and get early feedback.The new
handle_update_or_installation_asyncmethod combinesneeds_update_or_installationandinstall_or_update. Those were split because the code setsinstalling...status text ifneeds_update_or_installationreturns true but that meant that various if checks had to be duplicated across those two and generally made the logic harder to read. With this one method, there is now a callable function passed that can be used to start the progress (perhaps unnecessary since user could useconfiguration.set_view_statusbut then that would likely lead to inconsistent status messages across packages).The new method takes a dict with params. This is to allow adding new params without breaking API compatibility.
Most class methods are passed
PluginContextnow withconfigurationinstance now to allow packages to get resolved configuration. Some packages currently read settings withsublime.load_settingsbut that has the problem of not considering project overrides.Resolves #2039
Resolves #2491