Updated Getting started (markdown)

Baozheng Liu 2018-10-28 20:27:30 +08:00
parent f1e39cf0a4
commit 466020f634

@ -2,7 +2,7 @@
1. Build ccls / prebuilt binary (below) 1. Build ccls / prebuilt binary (below)
2. Setup your editor 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 ### 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 ### 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 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. 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. 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, `.ccls` does not do *word splitting* or *command substitution* for you,
you cannot use space-separated arguments like `%cpp -std=gnu++14 -pthread` 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`. If neither file exists, ccls assumes there is an imaginary `.ccls` with one line: `%clang`.