See the installation guide.
Note: Installing YCM on MacOS with Homebrew is not recommended because of library compatibility errors. Use the official installation guide instead.
(This applies to anyone compiling on gLinux, even if editing over SSHFS on MacOS) Ignore the above. Search the Google intranet for “YouCompleteMe” for installation instructions.
YouCompleteMe (and other tools like clang-tidy) require a JSON compilation database that specifies how each file is compiled. This database is normally stored in a file called
The following will create a
compile_commands.json file in the local directory:
gn gen build-zircon --export-compile-commands
YouCompleteMe will use
compile_commands.json to do code completion and find symbol definitions/declarations. See your editor's YouCompleteMe docs for details.
It should pick up the
json file automatically. If you want to move it out of the
zircon tree, you can move the file to its parent directory.
For Fuchsia integration, see https://fuchsia.googlesource.com/fuchsia/+/master/scripts/vim/README.md