Commands Reference#
Access commands by opening the command palette Ctrl+Shift+P (Cmd+Shift+P on Mac).
Note
All commands are listed in the command palette with the prefix Pigweed:.
This prefix is omitted in the descriptions below for readability.
Activate Bazelisk in Terminal#
This will change the $PATH of your active integrated terminal to include
the path to Bazelisk configured in your editor settings. This allows you to
run Bazel actions via Visual Studio Code commands or via bazelisk ...
invocations in the integrated terminal, while working in the same Bazel
environment.
Bootstrap Activated Terminal#
Launches a terminal and bootstraps the Pigweed Bootstrap environment.
Check Extensions#
The Pigweed extension lets development teams maintain a consistent
development environment for all members of the team by ensuring that the
recommendations in extensions.json are enforced. Learn more at
extension enforcement.
Disable Inactive File Code Intelligence#
Enable Inactive File Code Intelligence#
File Bug#
Found a problem in the Pigweed Visual Studio Code extension, other Pigweed tools, or Pigweed itself? Add a bug to our bug tracker to help us fix it.
Launch Activated Terminal#
Launches a terminal and activates the Pigweed Bootstrap environment. Run this if you have already bootstrapped.
Open Output Panel#
Opens the Pigweed output panel, which contains diagnostic output generated by the Pigweed extension. This is a good first place to look if things go wrong.
Refresh Compile Commands#
Manually trigger a refresh of the compilation databases used for C/C++ code intelligence. Normally for Bazel builds, the databases are refreshed automatically when build files are changed, but if you have automatic refreshing disabled, need to generate compile commands for GN or CMake targets, or need to refresh outside of the automatic cycle, this command will refresh manually.
Refresh Compile Commands and Set Code Analysis Target#
This is the same as the Refresh Compile Commands, except that it also triggers Select Code Analysis Target after the refresh is complete.
Select Code Analysis Target#
Select the target platform that clangd should use for code analysis.
Tip
You might notice that the currently-selected code analysis target is
stored in the pigweed.codeAnalysisTarget setting. If you edit this
value manually, don’t worry! The Pigweed extension will immediately do
everything it would have done if you had run this command.
Set Bazel Recommended Settings#
Configure Visual Studio Code to use Pigweed’s recommended Bazel settings. Note that these settings are only applied to the project settings, so they don’t affect any other project’s settings, or your user settings.
Sets the Buildifier path to the version bundled with the Pigweed extension, enabling Starlark code intelligence
Enables Bazel CodeLens support, allowing you to build and run targets directly from Bazel files
Set Bazelisk Path#
Pigweed recommends using Bazelisk instead of plain Bazel to ensure that the right version of Bazel is used. This command allows you to set the path to Bazelisk, selecting from versions installed on your system or the version bundled with the Pigweed extension.
Sync Settings#
Pigweed automatically syncronizes shared Visual Studio Code settings from
.vscode/settings.shared.json to .vscode/settings.json, but in the
case of conflicts, the automatic process will preserve the value in
.vscode/settings.json. If you want to do a full sync of the shared
settings to your personal settings, including overriding conflicting values,
run this command.