Work more effectively with Pigweed projects in Visual Studio Code!
Right now, all functionality is exposed through tasks, so your first step will be to open the command palette and select Tasks: Run Task
.
Running the Pigweed: Sync IDE
task is the equivalent of running the pw ide sync
CLI command.
For more information, see this page in the Pigweed docs.
Running the Pigweed: Set C++ Target Toolchain
will display a list of available target toolchains. Simply select one, and clangd
will be configured to use it.
Usually, Pigweed: Sync IDE
will automatically configure Visual Studio Code to use the correct Pigweed Python virtual environment. But if you need to change this manually, you can do so with Pigweed: Set Python Virtual Environment
.
Run Pigweed: Launch Activated Terminal
, or Pigweed: Bootstrap Activated Terminal
if you need to bootstrap first.
Pigweed: Format
== pw format --fix
Pigweed: Presubmit
== pw presubmit
Run Pigweed: File Bug
to let us know!
This extension provides the following configuration options:
pigweed.enforceExtensionRecommendations
: If set to true
, recommendations in your project‘s extensions.json
will be enforced. Recommended extensions will need to be installed, and non-recommended extensions will need to be disabled in the project’s workspace.If you want to contribute to this extension, here's how you can get started:
Ensure that you have npm
installed globally; this doesn't use the distribution provided by Pigweed yet.
Open the pigweed/pw_ide/ts/pigweed-vscode
directory directly in Visual Studio Code.
Run npm install
to add all dependencies.
Run “Run Extension” in the “Run and Debug” sidebar, or simply hit F5. A new Visual Studio Code window will open with the extension installed.
Make changes. The build will update automatically. Click the little green circle-with-an-arrow icon at the top of your development window to update the extension development host with the new build.
Run tests: npm run test
Install the build tool: npm install -g @vscode/vsce
Run pw ide vscode --build-extension