Files
carbon-lang/utils/vim/README.md
T
bingletigerandChristopher Di Bella 8fc87ebf76 Add manual installation commands for syntax highlighting in Neovim (#8038)
[Carbon Syntax Highlighting for Vim & Neovim][1] is missing manual
installation commands for Neovim.

Custom syntax files have to be present in `~/.config/nvim/syntax/`
([source][2]) and filetypes in `~/.config/nvim/ftdetect` ([source][3]).


[1]: https://github.com/carbon-language/carbon-lang/tree/trunk/utils/vim
[2]: https://neovim.io/doc/user/syntax/#mysyntaxfile
[3]: https://neovim.io/doc/user/filetype/#new-filetype

Co-authored-by: Christopher Di Bella <cjdb@google.com>
2026-11-02 18:52:53 +00:00

1.4 KiB

Carbon Syntax Highlighting for Vim & Neovim

For Carbon developers using Vim, this plugin provides syntax highlighting for .carbon files found throughout explorer/testdata

Repository and contributing

This code is developed as part of the Carbon Language project. Everything is then automatically mirrored into a dedicated repository.

If you would like to contribute, please follow the normal Carbon contributing guide and submit pull requests to the main repository.

Manual Installation

From the current directory utils/vim, please run the following commands to install the syntax file.

Vim Users

mkdir -p ~/.vim/syntax && cp syntax/carbon.vim ~/.vim/syntax/
mkdir -p ~/.vim/ftdetect && cp ftdetect/carbon.vim ~/.vim/ftdetect/

Neovim Users

mkdir -p ~/.config/nvim/syntax && cp syntax/carbon.vim ~/.config/nvim/syntax/
mkdir -p ~/.config/nvim/ftdetect && cp ftdetect/carbon.vim ~/.config/nvim/ftdetect/