docs: Add documentation for configuring clangd in C-only mode (#20255)
This commit is contained in:
parent
6dfff1b46d
commit
47defa2849
1 changed files with 9 additions and 4 deletions
|
@ -2,9 +2,14 @@
|
|||
|
||||
C support is available natively in Zed.
|
||||
|
||||
<!--
|
||||
TBD: Add instructions/configuration so clangd operates in C-only mode
|
||||
-->
|
||||
|
||||
- Tree Sitter: [tree-sitter/tree-sitter-c](https://github.com/tree-sitter/tree-sitter-c)
|
||||
- Language Server: [clangd/clangd](https://github.com/clangd/clangd)
|
||||
|
||||
## Clangd: Force detect as C
|
||||
|
||||
Clangd out of the box assumes mixed C++/C projects. If you have a C-only project you may wish to instruct clangd to all files as C using the `-xc` flag. To do this, create a `.clangd` file in the root of your project with the following:
|
||||
|
||||
```yaml
|
||||
CompileFlags:
|
||||
Add: [-xc]
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue