Skip to content

Commit

Permalink
minor: format editor/code
Browse files Browse the repository at this point in the history
  • Loading branch information
roife committed Dec 26, 2024
1 parent d6ec360 commit e481a51
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
17 changes: 9 additions & 8 deletions src/tools/rust-analyzer/editors/code/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/editors/code/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src/tools/rust-analyzer/editors/code/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function createCommands(): Record<string, CommandFactory> {
health: "stopped",
});
},
disabled: (_) => async () => { },
disabled: (_) => async () => {},
},

analyzerStatus: { enabled: commands.analyzerStatus },
Expand Down Expand Up @@ -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);
}
}

0 comments on commit e481a51

Please sign in to comment.