mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 02:38:12 +00:00
Switches from js to ts, and starts bundling files in order to produce a better package for deployment. Fixes the README.md to be a more appropriate front page, moving dev content to development.md. Makes the path to `carbon` configurable so that it's more stable than just running in `bazel-bin`. This is built using suggestions from samples at https://github.com/microsoft/vscode-extension-samples/tree/main/lsp-sample and https://github.com/microsoft/vscode-extension-samples/tree/main/esbuild-sample. Note the esbuild in particular comes from complaints from `vsce` to use an option from https://code.visualstudio.com/api/working-with-extensions/bundling-extension, and esbuild is just the first option detailed there (I have no real opinion on options). I'm bumping the version, and will do a release after merging. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
1.6 KiB
1.6 KiB
Extension development
Currently only contains basic syntax highlighting.
Releases
This assumes NodeJS is installed, along with vsce (using
npm install -g vsce).
npm install && vsce publish
Local installation
This assumes NodeJS is installed, along with vsce (using
npm install -g vsce).
npm install && vsce package -o carbon.vsix && realpath carbon.vsix- This installs dependencies, builds the VSIX file, and prints the path for installation.
- 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:
- In vscode, open the command palette and select "Extensions: Install from VSIX...".
- Enter the path printed by the above command.
- If you're using VS Code locally, run
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.