Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export class CodeActionsHandler {
private readonly logger: RazorLogger) { }

public register() {
// tslint:disable-next-line: no-floating-promises
this.serverClient.onRequestWithParams<SerializableDelegatedCodeActionParams, RazorCodeAction[], any>(
return this.serverClient.onRequestWithParams<SerializableDelegatedCodeActionParams, RazorCodeAction[], any>(
this.codeActionRequestType,
async (request, token) => this.provideCodeActions(request, token));
}
Expand Down Expand Up @@ -62,6 +61,6 @@ export class CodeActionsHandler {
}

private commandAsCodeAction(command: vscode.Command): RazorCodeAction {
return { title: command.title, data: { CustomTags: [ 'CodeActionFromVSCode' ] } } as RazorCodeAction;
return { title: command.title, data: { CustomTags: ['CodeActionFromVSCode'] } } as RazorCodeAction;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export class ColorPresentationHandler {
}

public register() {
// tslint:disable-next-line: no-floating-promises
this.serverClient.onRequestWithParams<SerializableColorPresentationParams, SerializableColorPresentation[], any>(
return this.serverClient.onRequestWithParams<SerializableColorPresentationParams, SerializableColorPresentation[], any>(
this.colorPresentationRequestType,
async (request: SerializableColorPresentationParams, token: vscode.CancellationToken) => this.provideHtmlColorPresentation(request, token));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export class DocumentColorHandler {
private readonly logger: RazorLogger) { }

public register() {
// tslint:disable-next-line: no-floating-promises
this.serverClient.onRequestWithParams<SerializableDocumentColorParams, SerializableColorInformation[], any>(
return this.serverClient.onRequestWithParams<SerializableDocumentColorParams, SerializableColorInformation[], any>(
this.documentColorRequestType,
async (request: SerializableDocumentColorParams, token: vscode.CancellationToken) => this.provideHtmlDocumentColors(request, token));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ export class FoldingRangeHandler {
private readonly logger: RazorLogger) { }

public register() {
// tslint:disable-next-line: no-floating-promises
this.serverClient.onRequestWithParams<SerializableFoldingRangeParams, SerializableFoldingRangeResponse, any>(
return this.serverClient.onRequestWithParams<SerializableFoldingRangeParams, SerializableFoldingRangeResponse, any>(
this.foldingRangeRequestType,
async (request, token) => this.provideFoldingRanges(request, token));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export class FormattingHandler {
private readonly logger: RazorLogger) { }

public register() {
// tslint:disable-next-line: no-floating-promises
this.serverClient.onRequestWithParams<SerializableFormattingParams, SerializableFormattingResponse, any>(
return this.serverClient.onRequestWithParams<SerializableFormattingParams, SerializableFormattingResponse, any>(
this.formattingRequestType,
async (request, token) => this.provideFormatting(request, token));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export class RazorFormattingFeature {
}

public register() {
// tslint:disable-next-line: no-floating-promises
this.serverClient.onRequestWithParams<RazorDocumentRangeFormattingRequest, RazorDocumentRangeFormattingResponse, any>(
return this.serverClient.onRequestWithParams<RazorDocumentRangeFormattingRequest, RazorDocumentRangeFormattingResponse, any>(
this.rangeFormattingRequestType,
async (request, token) => this.handleRangeFormatting(request, token));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ export class SemanticTokensRangeHandler {
constructor(private readonly serverClient: RazorLanguageServerClient) { }

public register() {
// tslint:disable-next-line: no-floating-promises
this.serverClient.onRequestWithParams<SerializableSemanticTokensParams, ProvideSemanticTokensResponse, any>(
return this.serverClient.onRequestWithParams<SerializableSemanticTokensParams, ProvideSemanticTokensResponse, any>(
this.semanticTokensRequestType,
async (request: SerializableSemanticTokensParams, token: vscode.CancellationToken) => this.getSemanticTokens(request, token));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ export async function activate(vscodeType: typeof vscodeapi, context: ExtensionC
await proposedApisFeature.register(vscodeType, localRegistrations);
}

razorFormattingFeature.register();
razorCodeActionRunner.register();
colorPresentationHandler.register();
documentColorHandler.register();
foldingRangeHandler.register();
formattingHandler.register();
semanticTokenHandler.register();
await razorFormattingFeature.register();
await colorPresentationHandler.register();
await documentColorHandler.register();
await foldingRangeHandler.register();
await formattingHandler.register();
await semanticTokenHandler.register();
});

const onStopRegistration = languageServerClient.onStop(() => {
Expand Down