Skip to content

Commit

Permalink
docs: update server_configurations.md
Browse files Browse the repository at this point in the history
skip-checks: true
  • Loading branch information
github-actions committed Apr 10, 2022
1 parent 1b4142e commit 5851881
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
17 changes: 12 additions & 5 deletions doc/server_configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,11 +652,9 @@ require'lspconfig'.ccls.setup{}

https://clangd.llvm.org/installation.html

**NOTE:** Clang >= 9 is recommended! See [this issue for more](https://github.com/neovim/nvim-lsp/issues/23).
**NOTE:** Clang >= 11 is recommended! See [this issue for more](https://github.com/neovim/nvim-lsp/issues/23).

clangd relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified
as compile_commands.json or, for simpler projects, a compile_flags.txt.
For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html). Alternatively, you can use [Bear](https://github.com/rizsotto/Bear).
clangd relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified as compile_commands.json, see https://clangd.llvm.org/installation#compile_commandsjson



Expand All @@ -682,7 +680,16 @@ require'lspconfig'.clangd.setup{}
```
- `root_dir` :
```lua
root_pattern("compile_commands.json", "compile_flags.txt", ".git") or dirname
root_pattern(
'.clangd',
'.clang-tidy',
'.clang-format',
'compile_commands.json',
'compile_flags.txt',
'configure.ac',
'.git'
)

```
- `single_file_support` :
```lua
Expand Down
17 changes: 12 additions & 5 deletions doc/server_configurations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -652,11 +652,9 @@ require'lspconfig'.ccls.setup{}

https://clangd.llvm.org/installation.html

**NOTE:** Clang >= 9 is recommended! See [this issue for more](https://github.com/neovim/nvim-lsp/issues/23).
**NOTE:** Clang >= 11 is recommended! See [this issue for more](https://github.com/neovim/nvim-lsp/issues/23).

clangd relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified
as compile_commands.json or, for simpler projects, a compile_flags.txt.
For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html). Alternatively, you can use [Bear](https://github.com/rizsotto/Bear).
clangd relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified as compile_commands.json, see https://clangd.llvm.org/installation#compile_commandsjson



Expand All @@ -682,7 +680,16 @@ require'lspconfig'.clangd.setup{}
```
- `root_dir` :
```lua
root_pattern("compile_commands.json", "compile_flags.txt", ".git") or dirname
root_pattern(
'.clangd',
'.clang-tidy',
'.clang-format',
'compile_commands.json',
'compile_flags.txt',
'configure.ac',
'.git'
)

```
- `single_file_support` :
```lua
Expand Down

0 comments on commit 5851881

Please sign in to comment.