Files
carbon-lang/utils/vscode
Richard Smith 202aae453f Get the VS Code extension working again. (#4037)
VSCode's JSON parser no longer accepts comments in at least textmate
grammars, so remove the comments. It's unclear whether VSCode changed
here or whether this hasn't worked since the comments were added.

Clean up the textmate grammar: refactor, add some missing operators and
keywords, classify keywords as introducer / modifier as appropriate, fix
comment grammar to require space after `//`, and generalize recognition
of iN, fN, uN to recognize all such type literals.

Be more cautious in language server -- I was seeing frequent crashes for
`IdentifierName` parse nodes whose token was not actually an identifier,
presumably due to error recovery.
2024-06-06 23:27:33 +00:00
..
2023-08-21 18:39:31 +00:00
2023-08-21 18:39:31 +00:00

VS Code Extension for Carbon

Currently only contains basic syntax highlighting.

Installing

  1. Install Node JS.
  2. To generate VS Code extension file (.vsix).
npm install && npm run package
  1. Install the extension
code --install-extension out/carbon.vsix

Development

  1. bazel build language_server in project root.
  2. Open utils/vscode folder in VS Code.
  3. Launch the extension using Run command (F5).
  4. In the opened window, open the carbon-lang repository as folder.
  5. Open a carbon file.
  6. Open code outline (Ctrl+Shift+O).

To update dependencies:

npm update