diff --git a/src/codelens/bazel_build_code_lens_provider.ts b/src/codelens/bazel_build_code_lens_provider.ts index a5383f4b..ea7dfc3f 100644 --- a/src/codelens/bazel_build_code_lens_provider.ts +++ b/src/codelens/bazel_build_code_lens_provider.ts @@ -139,6 +139,16 @@ export class BazelBuildCodeLensProvider implements vscode.CodeLensProvider { const commands: LensCommand[] = []; + // All targets support target copying and building. + commands.push({ + commandString: "bazel.copyTargetToClipboard", + name: "Copy", + }); + commands.push({ + commandString: "bazel.buildTarget", + name: "Build", + }); + // Only test targets support testing. if (ruleClass.endsWith("_test") || ruleClass === "test_suite") { commands.push({ @@ -161,12 +171,6 @@ export class BazelBuildCodeLensProvider implements vscode.CodeLensProvider { }); } - // All targets support building. - commands.push({ - commandString: "bazel.buildTarget", - name: "Build", - }); - for (const command of commands) { const title = `${command.name} ${targetShortName}`; result.push(