mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Code: enable prettier trailing commas
This commit is contained in:
parent
897b550049
commit
273299693b
31 changed files with 233 additions and 232 deletions
|
@ -17,15 +17,15 @@ export async function handle() {
|
|||
textDocument: { uri: editor.document.uri.toString() },
|
||||
offsets: editor.selections.map(s => {
|
||||
return Server.client.code2ProtocolConverter.asPosition(s.active);
|
||||
})
|
||||
}),
|
||||
};
|
||||
const response = await Server.client.sendRequest<Position[]>(
|
||||
'rust-analyzer/findMatchingBrace',
|
||||
request
|
||||
request,
|
||||
);
|
||||
editor.selections = editor.selections.map((sel, idx) => {
|
||||
const active = Server.client.protocol2CodeConverter.asPosition(
|
||||
response[idx]
|
||||
response[idx],
|
||||
);
|
||||
const anchor = sel.isEmpty ? active : sel.anchor;
|
||||
return new vscode.Selection(anchor, active);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue