mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-21 23:25:07 +00:00
fix editor issue
parent
e5ec341a55
commit
bc0dc30ab1
6
FAQ.md
6
FAQ.md
@ -1,6 +1,6 @@
|
||||
### Some C/C++ headers are not recognized
|
||||
|
||||
#### Make sure company-lsp is used
|
||||
#### if you are emacs user, make sure company-lsp is used
|
||||
<kbd>M-x</kbd> `company-diag`, make sure`Used backend:` includes `company-lsp`.
|
||||
|
||||
There are at least three sets of implicit include paths. They take effect without your `-I` option in `.ccls` or `compile_commands.json`
|
||||
@ -160,13 +160,13 @@ For headers that are not self-contained (e.g. some `/usr/include/bits/*.h` which
|
||||
#endif
|
||||
```
|
||||
|
||||
One approach ccls explored before was to compile its import file `a.c`, but it caused severe performance issue for some projects.
|
||||
One approach ccls explored before was to compile its import file `a.c`, but it caused severe performance issues for some projects.
|
||||
For smaller files this does not matter and checking for a header guard may help the situation.
|
||||
|
||||
### Multi-version headers
|
||||
|
||||
A header can be included in different translation units with different compiler flags. It may behave differently via `#ifdef`.
|
||||
Ideally there should be some mechanism to switch among different views (compiler flags) when you are editing the file.
|
||||
Ideally, there should be some mechanism to switch among different views (compiler flags) when you are editing the file.
|
||||
|
||||
For efficiency, a header is only indexed with one set of compiler flags, so either the `#if` block or `#else` is indexed, the other is left blank.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user