Skip to content

Question: is the max open count of 1 enforced? #407

@keyboardDrummer

Description

@keyboardDrummer

In the LSP documentation for the DidOpenTextDocument notification it mentions that:

An open notification must not be sent more than once without a corresponding close notification send before. This means open and close notification must be balanced and the max open count is one.

This seems awfully restrictive for text editors, since it would mean only 1 file with unsaved changes can be open at once. How is this being resolved in practice? Are LSP servers simply allowing a bigger max open count than 1? But then how can they indicate that this is allowed?

Another hypothesis I have is that many LSP servers in the TextDocumentSyncOptions of their ServerCapabilities set openClose to false, so they don't require sending open and close notifications, and instead rely on didChange and didSave notifications to know for what files to keep state in memory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions