Skip to content
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

Migrate to upstream workspace/textDocumentContent #1027

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Aug 23, 2024

Sibling PR to

The workspace/textDocumentContent API will be upstreamed as part of the upcoming version 3.18 of LSP, thus we no longer need a non-standard workspace/getReferenceDocument implementation. Some notes on the implementation:

  • Using this API requires upgrading to vscode-languageclient version 10, which is currently in beta. The migration requires using a different module resolution and updating some imports.
  • Proposed features have to be enabled explicitly on the LanguageClient instance
  • Similar to the upstreaming process of the inlay hint request, we keep the legacy request around for now and gate it behind a Swift version check (currently testing for toolchain version < 6.1, this might have to be updated depending on when the sourcekit-lsp PR is merged).

Since we may want to hold off with this until LSP 3.18 is finalized and the sourcekit-lsp PR is merged, I'm marking this PR as a draft for now. It already works, however, and can be used for testing.

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.

1 participant