mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue