Skip to content

Commit

Permalink
feat(test-utils): add sendDocumentRangeFormattingRequestRequest() api
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Feb 17, 2024
1 parent 82dc7a8 commit 8b74be8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/test-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@ export function startLanguageServer(serverModule: string, cwd?: string | URL) {
} satisfies _.DocumentFormattingParams
);
},
sendDocumentRangeFormattingRequestRequest(uri: string, range: _.Range, options: _.FormattingOptions) {
return connection.sendRequest(
_.DocumentRangeFormattingRequest.type,
{
textDocument: { uri },
range,
options,
} satisfies _.DocumentRangeFormattingParams
);
},
sendRenameRequest(uri: string, position: _.Position, newName: string) {
return connection.sendRequest(
_.RenameRequest.type,
Expand Down

0 comments on commit 8b74be8

Please sign in to comment.