mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +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
|
@ -11,7 +11,7 @@ export interface SourceChange {
|
|||
|
||||
export async function handle(change: SourceChange) {
|
||||
const wsEdit = Server.client.protocol2CodeConverter.asWorkspaceEdit(
|
||||
change.workspaceEdit
|
||||
change.workspaceEdit,
|
||||
);
|
||||
let created;
|
||||
let moved;
|
||||
|
@ -33,10 +33,10 @@ export async function handle(change: SourceChange) {
|
|||
await vscode.window.showTextDocument(doc);
|
||||
} else if (toReveal) {
|
||||
const uri = Server.client.protocol2CodeConverter.asUri(
|
||||
toReveal.textDocument.uri
|
||||
toReveal.textDocument.uri,
|
||||
);
|
||||
const position = Server.client.protocol2CodeConverter.asPosition(
|
||||
toReveal.position
|
||||
toReveal.position,
|
||||
);
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (!editor || editor.document.uri.toString() !== uri.toString()) {
|
||||
|
@ -48,7 +48,7 @@ export async function handle(change: SourceChange) {
|
|||
editor.selection = new vscode.Selection(position, position);
|
||||
editor.revealRange(
|
||||
new vscode.Range(position, position),
|
||||
vscode.TextEditorRevealType.Default
|
||||
vscode.TextEditorRevealType.Default,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue