From 8fc87ebf762b8c2c2b2dec4747212344f63067af Mon Sep 17 00:00:00 2001 From: bingletiger Date: Mon, 2 Nov 2026 18:52:53 +0000 Subject: [PATCH] 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 --- utils/vim/README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/vim/README.md b/utils/vim/README.md index c47e8bc0c7a3..782fe87035b8 100644 --- a/utils/vim/README.md +++ b/utils/vim/README.md @@ -23,12 +23,19 @@ and submit pull requests to the main repository. ## Manual Installation -### Vim Users - 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/ +```