-
Notifications
You must be signed in to change notification settings - Fork 929
Description
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.