Code: enable prettier trailing commas

This commit is contained in:
Laurențiu Nicola 2019-12-09 20:57:55 +02:00
parent 897b550049
commit 273299693b
31 changed files with 233 additions and 232 deletions

View file

@ -3,7 +3,7 @@ import * as lc from 'vscode-languageclient';
import { Server } from '../server';
import {
handle as applySourceChange,
SourceChange
SourceChange,
} from './apply_source_change';
export async function handle(event: { text: string }): Promise<boolean> {
@ -18,12 +18,12 @@ export async function handle(event: { text: string }): Promise<boolean> {
const request: lc.TextDocumentPositionParams = {
textDocument: { uri: editor.document.uri.toString() },
position: Server.client.code2ProtocolConverter.asPosition(
editor.selection.active
)
editor.selection.active,
),
};
const change = await Server.client.sendRequest<undefined | SourceChange>(
'rust-analyzer/onEnter',
request
request,
);
if (!change) {
return false;