-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix panic when using set-language on a scratch buffer
This commit adds a dummy URL for scratch buffers. * Add Document::scratch_url() to generate a dummy URL for the scratch buffer. The format of the URL is `file://<current working dir>/scratch<document id>`. The scheme is `file://` in order to confrom to LSP DocumentUri format and the DocumentUri on the LSP side is made unique using the document id. * Send textDocument/didClose notification to LSP server when a scratch buffer is written as from that point on it will have a valid URL and the dummy connection is no longer needed.
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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