From ad135ee1e42959800050ffff09636cfeed188970 Mon Sep 17 00:00:00 2001 From: jonmeow Date: Tue, 17 Dec 2024 16:13:24 -0800 Subject: [PATCH 1/2] Do a pass on vscode development instructions --- utils/vscode/development.md | 50 +++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/utils/vscode/development.md b/utils/vscode/development.md index 7c85e18204334..3eb75e72a902a 100644 --- a/utils/vscode/development.md +++ b/utils/vscode/development.md @@ -6,31 +6,43 @@ Exceptions. See /LICENSE for license information. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception --> -Currently only contains basic syntax highlighting. +## Tool setup -## Releases +NodeJS is required to build the extension. You will also need to install `vsce`: -This assumes NodeJS is installed, along with `vsce` (using -`npm install -g vsce`). +``` +npm install -g vsce +``` -1. `npm install && vsce publish` +## Common operations -## Local installation +- Build and install locally: -This assumes NodeJS is installed, along with `vsce` (using -`npm install -g vsce`). + ``` + npm install && vsce package -o carbon.vsix && code --install-extension carbon.vsix + ``` -1. `npm install && vsce package -o carbon.vsix && realpath carbon.vsix` - - This installs dependencies, builds the VSIX file, and prints the path - for installation. -2. Install the plugin: - - If you're using VS Code locally, run - `npm install && vsce package -o carbon.vsix && code --install-extension carbon.vsix` - - If you're using VS Code's remote mode: - 1. In vscode, open the - [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) - and select "Extensions: Install from VSIX...". - 2. Enter the path printed by the above command. +- Build and install 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 + ``` + +- Build and install using the UI: + + 1. `npm install && vsce package -o carbon.vsix && realpath carbon.vsix` + - This installs dependencies, builds the VSIX file, and prints the path. + 2. Open the + [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) + and select "Extensions: Install from VSIX...". + 3. Enter the path printed by the above command. + +- Build and publish the release using the website: + + 1. `npm install && vsce package -o carbon.vsix && realpath carbon.vsix` + 2. Go to https://marketplace.visualstudio.com/manage/publishers/carbon-lang + 3. Next to the extension name, click the "..." and select "Update". + 4. Select the `carbon.vsix` file. ## Development From b3b141372b06272e6e8e7bb7449cda7de86a27af Mon Sep 17 00:00:00 2001 From: jonmeow Date: Wed, 18 Dec 2024 10:32:11 -0800 Subject: [PATCH 2/2] reformat --- utils/vscode/development.md | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/utils/vscode/development.md b/utils/vscode/development.md index 3eb75e72a902a..6ec60494b1ad7 100644 --- a/utils/vscode/development.md +++ b/utils/vscode/development.md @@ -16,26 +16,29 @@ npm install -g vsce ## Common operations -- Build and install locally: +- Build and install: - ``` - npm install && vsce package -o carbon.vsix && code --install-extension carbon.vsix - ``` + - Locally: -- Build and install from a remote SSH host using VS Code Server: + ``` + npm install && vsce package -o carbon.vsix && code --install-extension carbon.vsix + ``` - ``` - npm install && vsce package -o carbon.vsix && ~/.vscode-server/cli/servers/Stable-*/server/bin/code-server --install-extension carbon.vsix - ``` + - From a remote SSH host using VS Code Server: -- Build and install using the UI: + ``` + npm install && vsce package -o carbon.vsix && ~/.vscode-server/cli/servers/Stable-*/server/bin/code-server --install-extension carbon.vsix + ``` - 1. `npm install && vsce package -o carbon.vsix && realpath carbon.vsix` - - This installs dependencies, builds the VSIX file, and prints the path. - 2. Open the - [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) - and select "Extensions: Install from VSIX...". - 3. Enter the path printed by the above command. + - Using the UI: + + 1. `npm install && vsce package -o carbon.vsix && realpath carbon.vsix` + - This installs dependencies, builds the VSIX file, and prints the + path. + 2. Open the + [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) + and select "Extensions: Install from VSIX...". + 3. Enter the path printed by the above command. - Build and publish the release using the website: