mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:10:12 +01:00
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.
VS Code Extension for Carbon
Currently only contains basic syntax highlighting.
Installing
- Install Node JS.
- To generate VS Code extension file (.vsix).
npm install && npm run package
- Install the extension
code --install-extension out/carbon.vsix
Development
bazel build language_serverin 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).
To update dependencies:
npm update