Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a custom LSP request + VS Code proposed API integration to support document highlights across multiple files (multi-document highlights), along with updated/added fourslash tests and baselines to validate the new behavior.
Changes:
- Introduces
custom/textDocument/multiDocumentHighlightinlsproto+internal/lsp/server.goand wires it to a newLanguageService.ProvideMultiDocumentHighlightsimplementation. - Updates fourslash infrastructure to request multi-document highlights with
filesToSearch, and adds/updates generated tests + baselines. - Implements a VS Code extension feature using the proposed
MultiDocumentHighlightProviderAPI and bumps VS Code/@types versions to a proposal-supporting engine level.
Reviewed changes
Copilot reviewed 26 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
internal/ls/documenthighlights.go |
Implements multi-file highlight computation and response shaping. |
internal/lsp/server.go |
Registers the custom LSP method handler and advertises capability. |
internal/lsp/lsproto/_generate/generate.mts |
Extends protocol model with request/structures + capability flag. |
internal/lsp/lsproto/lsp_generated.go |
Generated protocol types for the new request/response. |
_extension/src/vscode.proposed.multiDocumentHighlightProvider.d.ts |
Adds proposed VS Code API typings used by the extension. |
_extension/src/languageFeatures/documentHighlight.ts |
Client-side provider that calls the custom LSP method and converts results. |
_extension/src/client.ts |
Registers the new feature with the language client. |
_extension/package.json |
Enables the proposal + updates VS Code engine requirement. |
internal/fourslash/fourslash.go |
Adds VerifyBaselineDocumentHighlightsWithOptions (filesToSearch) and custom request path. |
internal/fourslash/_scripts/convertFourslash.mts |
Updates conversion to support multi-file document highlight baselines/options. |
internal/fourslash/tests/gen/*.go |
Updates existing tests and adds new generated tests covering multi-file behavior. |
testdata/baselines/reference/fourslash/documentHighlights/*.jsonc |
Baseline updates/new baselines including the filesToSearch header. |
package-lock.json |
Updates @types/vscode and engine metadata. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uses the same kind of idea as #3311, except that this is a separate method in VS Code, so it is in our LSP extension.