From 45aec88d8ff9011f19f5e561cf8b5bbaa6a0ecda Mon Sep 17 00:00:00 2001 From: JohnC32 Date: Thu, 19 Oct 2023 11:56:08 -0400 Subject: [PATCH] Minor clarifications on .ccls file contents --- Project-Setup.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Project-Setup.md b/Project-Setup.md index 7fa23bc..fce5155 100644 --- a/Project-Setup.md +++ b/Project-Setup.md @@ -200,10 +200,12 @@ with open(os.path.join(sys.argv[1], 'compile_commands.json')) as f: `.ccls` is a line-based text file at the project root. Its specifies compiler flags needed to properly index your code: `-I` `-D` etc. The first line specifies the compiler driver (usually `clang`), while each subsequent lines -specifies one argument to be added to the compiler command line. +specifies **one** argument to be added to the compiler command line. Blank and "# comment" +lines are ignored. No whitespace splitting is performed on the argument, thus `-I foo` cannot be -used (use `-Ifoo` or `-I\nfoo` for example). +used (use `-Ifoo` or `-I\nfoo` for example). If an include path has spaces enter that +as without escaping the spaces. For example, `-I/include/path/with a space/to/dir/foo`. Subdirectories of the project can also contain `.ccls` files, if needed, to specify compiler flags specific to those directories.