Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitabde9a3

Browse files
authored
Split format requests into separate messages for telemetry (microsoft#6068)
1 parente8bc0e8 commitabde9a3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎Extension/src/LanguageServer/client.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,10 @@ const GetDocumentSymbolRequest: RequestType<GetDocumentSymbolRequestParams, Loca
405405
constGetSymbolInfoRequest:RequestType<WorkspaceSymbolParams,LocalizeSymbolInformation[],void,void>=newRequestType<WorkspaceSymbolParams,LocalizeSymbolInformation[],void,void>('cpptools/getWorkspaceSymbols');
406406
constGetFoldingRangesRequest:RequestType<GetFoldingRangesParams,GetFoldingRangesResult,void,void>=newRequestType<GetFoldingRangesParams,GetFoldingRangesResult,void,void>('cpptools/getFoldingRanges');
407407
constGetSemanticTokensRequest:RequestType<GetSemanticTokensParams,GetSemanticTokensResult,void,void>=newRequestType<GetSemanticTokensParams,GetSemanticTokensResult,void,void>('cpptools/getSemanticTokens');
408-
constDocumentFormatRequest:RequestType<FormatParams,TextEdit[],void,void>=newRequestType<FormatParams,TextEdit[],void,void>('cpptools/format');
408+
constFormatDocumentRequest:RequestType<FormatParams,TextEdit[],void,void>=newRequestType<FormatParams,TextEdit[],void,void>('cpptools/formatDocument');
409+
constFormatRangeRequest:RequestType<FormatParams,TextEdit[],void,void>=newRequestType<FormatParams,TextEdit[],void,void>('cpptools/formatRange');
410+
constFormatOnTypeRequest:RequestType<FormatParams,TextEdit[],void,void>=newRequestType<FormatParams,TextEdit[],void,void>('cpptools/formatOnType');
411+
409412
// Notifications to the server
410413
constDidOpenNotification:NotificationType<DidOpenTextDocumentParams,void>=newNotificationType<DidOpenTextDocumentParams,void>('textDocument/didOpen');
411414
constFileCreatedNotification:NotificationType<FileChangedParams,void>=newNotificationType<FileChangedParams,void>('cpptools/fileCreated');
@@ -702,7 +705,7 @@ class DocumentFormattingEditProvider implements vscode.DocumentFormattingEditPro
702705
}
703706
}
704707
};
705-
returnthis.client.languageClient.sendRequest(DocumentFormatRequest,params)
708+
returnthis.client.languageClient.sendRequest(FormatDocumentRequest,params)
706709
.then((textEdits)=>{
707710
constresult:vscode.TextEdit[]=[];
708711
textEdits.forEach((textEdit)=>{
@@ -759,7 +762,7 @@ class DocumentRangeFormattingEditProvider implements vscode.DocumentRangeFormatt
759762
}
760763
}
761764
};
762-
returnthis.client.languageClient.sendRequest(DocumentFormatRequest,params)
765+
returnthis.client.languageClient.sendRequest(FormatRangeRequest,params)
763766
.then((textEdits)=>{
764767
constresult:vscode.TextEdit[]=[];
765768
textEdits.forEach((textEdit)=>{
@@ -816,7 +819,7 @@ class OnTypeFormattingEditProvider implements vscode.OnTypeFormattingEditProvide
816819
}
817820
}
818821
};
819-
returnthis.client.languageClient.sendRequest(DocumentFormatRequest,params)
822+
returnthis.client.languageClient.sendRequest(FormatOnTypeRequest,params)
820823
.then((textEdits)=>{
821824
constresult:vscode.TextEdit[]=[];
822825
textEdits.forEach((textEdit)=>{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp