Skip to content

bridge: unregistering a static changeNotifications id does not withdraw folder-change support #1117

Description

@atusy

Problem

workspace.workspaceFolders.changeNotifications may be a string: per LSP 3.18 it is then the id under which the notification is registered, "and can be used to unregister for these notifications". kakehashi treats Right(id) as capable for the connection's lifetime (supports_workspace_folder_changes(&ServerCapabilities)), and the id never enters DynamicCapabilityRegistry, so a client/unregisterCapability { id, method: "workspace/didChangeWorkspaceFolders" } withdraws nothing and folder changes keep being forwarded.

Pre-existing; #1107 (#968) made dynamic registrations count and honors their unregistration, and documents that a static id is not covered.

Fix shape

At handshake, when changeNotifications is Right(id), seed the registry with Registration { id, method: "workspace/didChangeWorkspaceFolders" } and let the static predicate count only Left(true), so the live registry read decides for both.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions