Update docs to represent new use_clangd flag

This commit is contained in:
Kadir Cetinkaya 2019-02-18 16:37:33 +01:00
parent 032281307d
commit 753d39f8da
2 changed files with 15 additions and 18 deletions

View File

@ -215,7 +215,7 @@ that case **clangd** will be preferred unless you have the following in your
`vimrc`: `vimrc`:
```viml ```viml
let g:ycm_use_clangd = "Never" let g:ycm_use_clangd = 0
``` ```
Compiling YCM **without** semantic support for C-family languages: Compiling YCM **without** semantic support for C-family languages:
@ -305,7 +305,7 @@ that case **clangd** will be preferred unless you have the following in your
`vimrc`: `vimrc`:
```viml ```viml
let g:ycm_use_clangd = "Never" let g:ycm_use_clangd = 0
``` ```
Compiling YCM **without** semantic support for C-family languages: Compiling YCM **without** semantic support for C-family languages:
@ -412,7 +412,7 @@ that case **clangd** will be preferred unless you have the following in your
`vimrc`: `vimrc`:
```viml ```viml
let g:ycm_use_clangd = "Never" let g:ycm_use_clangd = 0
``` ```
Compiling YCM **without** semantic support for C-family languages: Compiling YCM **without** semantic support for C-family languages:
@ -496,7 +496,7 @@ that case **clangd** will be preferred unless you have the following in your
`vimrc`: `vimrc`:
```viml ```viml
let g:ycm_use_clangd = "Never" let g:ycm_use_clangd = 0
``` ```
Compiling YCM **without** semantic support for C-family languages: Compiling YCM **without** semantic support for C-family languages:
@ -709,9 +709,8 @@ process.
If you DO care about semantic support for C-family languages, and want to If you DO care about semantic support for C-family languages, and want to
use **experimental** [clangd][]-based completer then you need to add use **experimental** [clangd][]-based completer then you need to add
following lines to your `vimrc`: following line to your `vimrc`:
```viml ```viml
let g:ycm_use_clangd = "Always"
let g:ycm_clangd_binary_path = "/path/to/clangd" let g:ycm_clangd_binary_path = "/path/to/clangd"
``` ```
You need to change /path/to/clangd with the path of binary you downloaded in You need to change /path/to/clangd with the path of binary you downloaded in
@ -2992,25 +2991,23 @@ let g:ycm_disable_for_files_larger_than_kb = 1000
### The `g:ycm_use_clangd` option ### The `g:ycm_use_clangd` option
This option controls whether **clangd** should be used as completion engine for This option controls whether **clangd** should be used as completion engine for
C-family languages. Can take one of the following values: `'Always'`, `'Auto'` C-family languages. Can take one of the following values: `1`, `0`, with
or `'Never'`, with meanings: meanings:
- `'Always'`: YCM will use clangd completer directly. - `1`: YCM will use clangd if clangd binary exists in third party or it was
- `'Auto'`: YCM will use clangd only if clangd binary exists in third party or provided with `ycm_clangd_binary_path` option.
it was provided with `ycm_clangd_binary_path` option. - `0`: YCM will never use clangd completer.
- `'Never'`: YCM will never use clangd completer.
Default: `'Auto'` Default: `1`
```viml ```viml
let g:ycm_use_clangd = 'Auto' let g:ycm_use_clangd = 1
``` ```
### The `g:ycm_clangd_binary_path` option ### The `g:ycm_clangd_binary_path` option
When `ycm_use_clangd` option is set to `'Always'`, this option sets the path to When `ycm_use_clangd` option is set to `1`, this option sets the path to
**clangd** binary. If `ycm_use_clangd` option is set to `'Auto'` this option **clangd** binary.
sets the fallback path in case the clangd binary in third party doesn't exist.
Default: `''` Default: `''`

View File

@ -275,7 +275,7 @@ let g:ycm_java_jdtls_use_clean_workspace =
\ get( g:, 'ycm_java_jdtls_use_clean_workspace', 1 ) \ get( g:, 'ycm_java_jdtls_use_clean_workspace', 1 )
let g:ycm_use_clangd = let g:ycm_use_clangd =
\ get( g:, 'ycm_use_clangd', 'Auto' ) \ get( g:, 'ycm_use_clangd', 1 )
let g:ycm_clangd_binary_path = let g:ycm_clangd_binary_path =
\ get( g:, 'ycm_clangd_binary_path', '' ) \ get( g:, 'ycm_clangd_binary_path', '' )