FAQ: xref

Fangrui Song 2018-10-08 00:25:07 -07:00
parent 0c099d647f
commit 0817dac56d

26
FAQ.md

@ -165,10 +165,6 @@ ccls will save a file in `cacheDirectory`:
* <code>extern int <kbd>a</kbd>;</code> If `ReferenceContext.includeDeclaration` is true, the definition and declarations are also listed. * <code>extern int <kbd>a</kbd>;</code> If `ReferenceContext.includeDeclaration` is true, the definition and declarations are also listed.
* If no references is found but the point is on the first line, list `#include` lines referencing current file. * If no references is found but the point is on the first line, list `#include` lines referencing current file.
### `$ccls/member derived:false`
* <code>struct <kbd>A</kbd>:B{void <kbd>f</kbd>()override;};</code> lists `B` or `B::f()`
### `textDocument/implementation` ### `textDocument/implementation`
* <code>struct <kbd>B</kbd>{virtual void <kbd>f</kbd>();};</code> derived classes or virtual function overrides * <code>struct <kbd>B</kbd>{virtual void <kbd>f</kbd>();};</code> derived classes or virtual function overrides
@ -180,18 +176,22 @@ ccls will save a file in `cacheDirectory`:
### [`$ccls/call`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_call.cc) ### [`$ccls/call`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_call.cc)
```elisp Find callers. If parameter `callee:true` is specified, find callees instead.
(ccls-call-hierarchy nil) ; caller hierarchy
(ccls-call-hierarchy t) ; callee hierarchy Specify `hierarchy:true` to enable hierarchical view.
```
### [`$ccls/inheritance`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_inheritance.cc) ### [`$ccls/inheritance`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_inheritance.cc)
```elisp Find base classes/overriden functions. If parameter `derived:true` is specified, find derived classes/functions instead.
(ccls-inheritance-hierarchy nil) ; base hierarchy
(ccls-inheritance-hierarchy t) ; derived hierarchy Specify `hierarchy:true` to enable hierarchical view.
```
### [`$ccls/member`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_member.cc) ### [`$ccls/member`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_member.cc)
Recursively list members of a record type. 😂 nobody has implemented vscode-ccls UI for the feature. Help wanted! Recursively list member variables of a record type. 😂 nobody has implemented vscode-ccls UI for the feature. Help wanted!
* <code>struct <kbd>A</kbd>:B{void f()override;};</code> lists `B` or `B::f()`
If parameter `kind:3` is specified, list member functions/functions in a namespace
* <code>struct <kbd>A</kbd>{void f();};</code> lists `A::f()`