diff options
| author | roife <roifewu@gmail.com> | 2024-12-26 20:28:11 +0800 |
|---|---|---|
| committer | roife <roifewu@gmail.com> | 2024-12-26 20:44:42 +0800 |
| commit | e481a51feb1a4f3c860be87c1f27fea78ba3e1ce (patch) | |
| tree | 91650c4116af1c3e401e33d8de2bd56124c797aa | |
| parent | d6ec36063f68e3a7c18fde7e4d50467bcc2e0439 (diff) | |
| download | rust-e481a51feb1a4f3c860be87c1f27fea78ba3e1ce.tar.gz rust-e481a51feb1a4f3c860be87c1f27fea78ba3e1ce.zip | |
minor: format editor/code
| -rw-r--r-- | src/tools/rust-analyzer/editors/code/src/client.ts | 17 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/editors/code/src/commands.ts | 2 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/editors/code/src/main.ts | 8 |
3 files changed, 14 insertions, 13 deletions
diff --git a/src/tools/rust-analyzer/editors/code/src/client.ts b/src/tools/rust-analyzer/editors/code/src/client.ts index 5d33d7a6adb..eac7b849fdb 100644 --- a/src/tools/rust-analyzer/editors/code/src/client.ts +++ b/src/tools/rust-analyzer/editors/code/src/client.ts @@ -348,9 +348,9 @@ class ExperimentalFeatures implements lc.StaticFeature { initialize( _capabilities: lc.ServerCapabilities, _documentSelector: lc.DocumentSelector | undefined, - ): void { } - dispose(): void { } - clear(): void { } + ): void {} + dispose(): void {} + clear(): void {} } class OverrideFeatures implements lc.StaticFeature { @@ -368,9 +368,9 @@ class OverrideFeatures implements lc.StaticFeature { initialize( _capabilities: lc.ServerCapabilities, _documentSelector: lc.DocumentSelector | undefined, - ): void { } - dispose(): void { } - clear(): void { } + ): void {} + dispose(): void {} + clear(): void {} } function isCodeActionWithoutEditsAndCommands(value: any): boolean { @@ -398,8 +398,9 @@ export let HOVER_REFERENCE_COMMAND: ra.CommandLink[] = []; function renderCommand(cmd: ra.CommandLink): string { HOVER_REFERENCE_COMMAND.push(cmd); - return `[${cmd.title}](command:rust-analyzer.hoverRefCommandProxy?${HOVER_REFERENCE_COMMAND.length - 1 - } '${cmd.tooltip}')`; + return `[${cmd.title}](command:rust-analyzer.hoverRefCommandProxy?${ + HOVER_REFERENCE_COMMAND.length - 1 + } '${cmd.tooltip}')`; } function renderHoverActions(actions: ra.CommandLinkGroup[]): vscode.MarkdownString { diff --git a/src/tools/rust-analyzer/editors/code/src/commands.ts b/src/tools/rust-analyzer/editors/code/src/commands.ts index a4b53730ad5..73e39c900e7 100644 --- a/src/tools/rust-analyzer/editors/code/src/commands.ts +++ b/src/tools/rust-analyzer/editors/code/src/commands.ts @@ -1145,7 +1145,7 @@ function isUpdatingTest(runnable: ra.Runnable): boolean { } const env = runnable.args.environment; - return env ? ['UPDATE_EXPECT', 'INSTA_UPDATE', 'SNAPSHOTS'].some(key => key in env) : false; + return env ? ["UPDATE_EXPECT", "INSTA_UPDATE", "SNAPSHOTS"].some((key) => key in env) : false; } export function runSingle(ctx: CtxInit): Cmd { diff --git a/src/tools/rust-analyzer/editors/code/src/main.ts b/src/tools/rust-analyzer/editors/code/src/main.ts index 478673d5915..fdf43f66f94 100644 --- a/src/tools/rust-analyzer/editors/code/src/main.ts +++ b/src/tools/rust-analyzer/editors/code/src/main.ts @@ -148,7 +148,7 @@ function createCommands(): Record<string, CommandFactory> { health: "stopped", }); }, - disabled: (_) => async () => { }, + disabled: (_) => async () => {}, }, analyzerStatus: { enabled: commands.analyzerStatus }, @@ -207,10 +207,10 @@ function checkConflictingExtensions() { vscode.window .showWarningMessage( `You have both the rust-analyzer (rust-lang.rust-analyzer) and Rust (rust-lang.rust) ` + - "plugins enabled. These are known to conflict and cause various functions of " + - "both plugins to not work correctly. You should disable one of them.", + "plugins enabled. These are known to conflict and cause various functions of " + + "both plugins to not work correctly. You should disable one of them.", "Got it", ) - .then(() => { }, console.error); + .then(() => {}, console.error); } } |
