feat(lsp): implement textDocument/selectionRange (#9845)

Ref: #8643
This commit is contained in:
Jean Pierre 2021-03-23 18:33:25 -05:00 committed by GitHub
parent b233985fea
commit 77cfadf532
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 240 additions and 1 deletions

View file

@ -703,6 +703,15 @@ delete Object.prototype.__proto__;
),
);
}
case "getSmartSelectionRange": {
return respond(
id,
languageService.getSmartSelectionRange(
request.specifier,
request.position,
),
);
}
case "getSupportedCodeFixes": {
return respond(
id,

View file

@ -61,6 +61,7 @@ declare global {
| GetQuickInfoRequest
| GetReferencesRequest
| GetSignatureHelpItemsRequest
| GetSmartSelectionRange
| GetSupportedCodeFixes;
interface BaseLanguageServerRequest {
@ -169,6 +170,12 @@ declare global {
options: ts.SignatureHelpItemsOptions;
}
interface GetSmartSelectionRange extends BaseLanguageServerRequest {
method: "getSmartSelectionRange";
specifier: string;
position: number;
}
interface GetSupportedCodeFixes extends BaseLanguageServerRequest {
method: "getSupportedCodeFixes";
}