Updates to compose language service packaging structure#174
Merged
bwateratmsft merged 14 commits intomainfrom Feb 9, 2026
Merged
Updates to compose language service packaging structure#174bwateratmsft merged 14 commits intomainfrom
bwateratmsft merged 14 commits intomainfrom
Conversation
bwateratmsft
commented
Feb 6, 2026
bwateratmsft
commented
Feb 6, 2026
|
|
||
| export class DocumentFormattingProvider extends ProviderBase<DocumentFormattingParams & ExtendedParams, TextEdit[] | undefined, never, never> { | ||
| public on(params: DocumentFormattingParams & ExtendedParams, token: CancellationToken): TextEdit[] | undefined { | ||
| public on(params: DocumentFormattingParams & ExtendedParams, token: CancellationToken): Promise<TextEdit[] | undefined> { |
Collaborator
Author
There was a problem hiding this comment.
I don't know why but TypeScript was really unhappy with the providers that didn't return a Promise<R>. It was easier to just make them all return promises.
This applies here, ImageLinkProvider, and ServiceStartupCodeLensProvider.
Comment on lines
+8
to
+10
| export interface TextDocumentParams { // This interface ought to exist in `vscode-languageserver`, like `TextDocumentPositionParams`, but here we are... | ||
| textDocument: TextDocumentIdentifier; | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
This is just moved out from src/service/ExtendedParams.ts.
|
|
||
| // Set up a client listener to respond to doc settings requests | ||
| testConnection.client.onRequest(DocumentSettingsRequest.method, (params) => { | ||
| testConnection.client.onRequest(DocumentSettingsRequest.type, (params) => { |
Collaborator
Author
There was a problem hiding this comment.
This repeats in a few places, but changing from .method (a string) to .type (a type definition) makes TypeScript smarter about figuring out the expected input/output types.
| * This class will note the features covered by an alternate YAML language service, | ||
| * that the compose language service can disable | ||
| */ | ||
| export class AlternateYamlLanguageServiceClientFeature implements StaticFeature, vscode.Disposable { |
Collaborator
Author
There was a problem hiding this comment.
| * This class implements functionality to allow the language server to request information about an open document (including tab size and line endings), and also | ||
| * notify the language server if those settings change | ||
| */ | ||
| export class DocumentSettingsClientFeature implements StaticFeature, vscode.Disposable { |
Collaborator
Author
There was a problem hiding this comment.
patverb
approved these changes
Feb 9, 2026
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.
TODO:
AlternateYamlClientFeatureandDocumentSettingsClientFeaturestill work as expected