Skip to content

Updates to compose language service packaging structure#174

Merged
bwateratmsft merged 14 commits intomainfrom
bmw/updates
Feb 9, 2026
Merged

Updates to compose language service packaging structure#174
bwateratmsft merged 14 commits intomainfrom
bmw/updates

Conversation

@bwateratmsft
Copy link
Collaborator

@bwateratmsft bwateratmsft commented Feb 6, 2026

TODO:

  • Verify imports in Container Tools
  • Verify running as bin
  • Ensure AlternateYamlClientFeature and DocumentSettingsClientFeature still work as expected


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> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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 {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

* 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 {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bwateratmsft bwateratmsft marked this pull request as ready for review February 6, 2026 21:17
@bwateratmsft bwateratmsft requested a review from a team as a code owner February 6, 2026 21:17
@bwateratmsft bwateratmsft requested a review from Copilot February 6, 2026 21:19

This comment was marked as resolved.

@bwateratmsft bwateratmsft merged commit 244b031 into main Feb 9, 2026
2 checks passed
@bwateratmsft bwateratmsft deleted the bmw/updates branch February 9, 2026 15:28
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.

2 participants