mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
The `style = "fixed"` is partially implied by `indent = 4`, but not fully in some specific cases. There were also bugs in fully applying it that are now fixed, and so we can specify it explicitly to get rumdl to canonicalize nested list indentation more thoroughly. Assisted-by: Antigravity with Gemini
2.6 KiB
2.6 KiB
Extension development
Tool setup
NodeJS is required to build the extension. You will also need to install vsce
and ovsx:
npm install -g @vscode/vsce ovsx
This installs vsce and ovsx to /usr/local/bin. Ensure that
/usr/local/bin is in your $PATH environment variable to use it.
Common operations
-
Build and install:
-
Locally:
npm install && vsce package -o carbon.vsix && code --install-extension carbon.vsix -
From a remote SSH host using VS Code Server:
npm install && vsce package -o carbon.vsix && ~/.vscode-server/cli/servers/Stable-*/server/bin/code-server --install-extension carbon.vsix -
Using the UI:
npm install && vsce package -o carbon.vsix && realpath carbon.vsix- This installs dependencies, builds the VSIX file, and prints the path.
- Open the command palette and select "Extensions: Install from VSIX...".
- Enter the path printed by the above command.
-
-
Publish a new release:
- Increase the version number in
package.json. - Build and publish to the VSCode Marketplace using the website:
npm install && vsce package -o carbon.vsix && realpath carbon.vsix- Go to
https://marketplace.visualstudio.com/manage/publishers/carbon-lang
- We use
infra-role@carbon-lang.devfor publishing; the GitHub accountCarbonInfraBotcan also be used for login. Contact leads if you require access.
- We use
- Next to the extension name, click the "..." and select "Update".
- Select the
carbon.vsixfile.
- Build and publish to the Open VSX Registry by following the Open VSX documentation for publishing extensions.
- Increase the version number in
Development
bazel build //toolchainin project root.- Open utils/vscode folder in VS Code.
- Launch the extension using Run command (F5).
- In the opened window, open the carbon-lang repository as folder.
- Open a carbon file.
- Open code outline (Ctrl+Shift+O).
Debugging output
- Go to the "Output" panel.
- In the top right, there is a dropdown; select "Carbon Language Server".
Updating dependencies
To update dependencies, run npm update.