mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-15 12:38:30 +00:00
[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>
42 lines
1.4 KiB
Markdown
42 lines
1.4 KiB
Markdown
# Carbon Syntax Highlighting for Vim & Neovim
|
|
|
|
<!--
|
|
Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
Exceptions. See /LICENSE for license information.
|
|
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
-->
|
|
|
|
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](https://github.com/carbon-language/carbon-lang/tree/trunk/utils/vim) of
|
|
the [Carbon Language](https://github.com/carbon-language/carbon-lang) project.
|
|
Everything is then automatically mirrored into a dedicated
|
|
[repository](https://github.com/carbon-language/vim-carbon-lang).
|
|
|
|
If you would like to contribute, please follow the normal
|
|
[Carbon contributing guide](https://github.com/carbon-language/carbon-lang/blob/trunk/CONTRIBUTING.md)
|
|
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/
|
|
```
|