Repository navigation
Fix errors on re-enabling disabled LSP package - #2951
Merged
Merged
Conversation
rchl
commented
Jun 7, 2026
jwortmann
approved these changes
Jun 10, 2026
Member
|
It's an improvement! But I still see a discrepancy between "LSP: Enable/Disable language server globally" and "Package Control: Enable/Disable Package":
|
Member
Author
|
I would guess some state is not cleaned/reset properly in |
Member
Author
|
Unfortunately this triggers sublimehq/sublime_text#6868 sometimes when re-saving |
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.
Fix issue mentioned in sublimelsp/LSP-basedpyright#154 where disabling and then enabling LSP-* package triggers weird errors. The same issue can trigger on package updates.
The issue was that on disabling the plugin, the active settings listener from
SettingsRegistrationwould trigger and immediately re-register the external plugin. Fix by explicitly unregistering the listener when unregistering a plugin.I think I've finally came up with a clean fix for the weird
SettingsRegistrationlistener handling. NowSettingsRegistrationis owned entirely byClientConfigswhere both registration and un-registration happens and it's not passed toClientConfigs.ClientConfigonly receives the newSettingsStorewithsublime.Settingsand settings path - all that it needs.