From 466020f63445e6706be6b39b4a01f1ad17ca7497 Mon Sep 17 00:00:00 2001 From: Baozheng Liu Date: Sun, 28 Oct 2018 20:27:30 +0800 Subject: [PATCH] Updated Getting started (markdown) --- Getting-started.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Getting-started.md b/Getting-started.md index fe558a2..ba0a059 100644 --- a/Getting-started.md +++ b/Getting-started.md @@ -2,7 +2,7 @@ 1. Build ccls / prebuilt binary (below) 2. Setup your editor -3. Project setup: generate `compile_commands.json` or `.ccls` +3. Project setup: project root detect and generate `compile_commands.json` or `.ccls` ### Build the ccls language server @@ -50,13 +50,18 @@ If you use other editors not listed there (LSP decouples servers and clients, so ### Project setup +#### Root Detection + If your project has subprojects (e.g. separate repos), some setup in your editor is needed for proper root detection: https://github.com/MaskRay/ccls/wiki/FAQ#project-root-detection -#### [[compile_commands.json]] +#### Parameters Configuration +There are several ways you can choose. + +1. [[compile_commands.json]] Remember to copy/symlink it to the project root. -#### `.ccls` +2. `.ccls` Alternatively, create a file named `.ccls` located in the project root. Easy to use for simple projects. @@ -82,7 +87,7 @@ Note: `.ccls` does not do *word splitting* or *command substitution* for you, you cannot use space-separated arguments like `%cpp -std=gnu++14 -pthread` -#### No `.ccls` or `compile_commands.json` +3. No `.ccls` or `compile_commands.json` If neither file exists, ccls assumes there is an imaginary `.ccls` with one line: `%clang`.