Commit Graph

2 Commits

Author SHA1 Message Date
Alex Hoppen
baa3b70f7c A couple refinements to the window/didChangeActiveDocument notification
- Clarify that this must only be called with documents that are open in SourceKit-LSP and add a check for that.
- Allow sending `null` to indicate that no SourceKit-LSP document is currently active.
- Cancel preparation tasks for other workspaces that don’t contain the currently active document.
2025-02-24 13:58:19 -08:00
Alex Hoppen
4d00c9089b Add notification to inform SourceKit-LSP about the currently active document
SourceKit-LSP prepares the currently active file for editor functionality and currently infers the currently active document from whichever received the last `TextDocumentRequest`.

If an editor is capable of doing so, it should be able to report the document that the user currently has focused so that SourceKit-LSP does not have to infer this information from other requests.

Also clean up some handling code for experimental capabilities.
2025-02-20 12:29:30 -08:00