Skip to content

Notify sourcekit-lsp of active document changes #1404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 17, 2025

Conversation

plemarquand
Copy link
Contributor

@plemarquand plemarquand commented Feb 24, 2025

sourcekit-lsp recently added an LSP extension method to notify the server of the active documnent, so it doesn't need to infer it from information in other requests. This capability was added in swiftlang/sourcekit-lsp#1989.

This also relies on swiftlang/sourcekit-lsp#1994

@plemarquand
Copy link
Contributor Author

@ahoppen This makes the assumption its OK to notify about any file type, not just ones recognized by SourceKit-LSP. Is this correct?

`sourcekit-lsp` recently added an LSP extension method to notify the
server of the active documnent, so it doesn't need to infer it from
information in other requests. This capability was added in
swiftlang/sourcekit-lsp#1989.
@plemarquand plemarquand force-pushed the lsp-change-active-document branch from 20bc378 to ad20f13 Compare February 24, 2025 17:00
@ahoppen
Copy link
Member

ahoppen commented Feb 24, 2025

Good points, Paul. I am clarifying the spec to answer these questions in swiftlang/sourcekit-lsp#1994.

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you

@plemarquand plemarquand merged commit 767fb08 into swiftlang:main Mar 17, 2025
15 checks passed
@plemarquand plemarquand deleted the lsp-change-active-document branch March 17, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants