Files
carbon-lang/utils/vim/ftdetect
x2wandJon Ross-Perkins 52f80c25ab Add syntax highlighting for vim and neovim (#1740)
PR to add a vim syntax file to support syntax highlighting for .carbon files. Since the Carbon language specification is still in progress, a single syntax file is easier to maintain and adapt to design changes in Carbon. After the language syntax has matured and stabilized, advanced tooling such as Treesitter and Language Servers can take over the syntax highlighting in neovim.

### Highlighting Support
- comments and preprocessors (RUN, CHECK, etc)
- string and numeric literals
- primitive type names, classes, aliases
- control flow constructs
- identifier names
- package and library declarations
- most keywords mentioned in `docs/design/README.md`

### With a Dark Colorscheme:
![carbon01](https://user-images.githubusercontent.com/78875280/181017032-e2c140c8-e98a-46d3-8f94-b8dc0f28ce49.png)

This image is longer than I thought, so I'm not posting what it looks like in a light colorscheme, but it should look fine as long as vim highlight-groups are properly defined.

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
2022-07-31 08:32:00 -07:00
..