.

Fangrui Song 2018-09-13 17:15:26 -07:00
parent 3342c7371a
commit bd483482da
3 changed files with 9 additions and 9 deletions

@ -164,10 +164,10 @@ Recommended helpers:
(lsp-ui-peek-find-custom 'caller "$ccls/call")) (lsp-ui-peek-find-custom 'caller "$ccls/call"))
(defun ccls/vars (kind) (defun ccls/vars (kind)
(lsp-ui-peek-find-custom 'vars "$ccls/vars" `(:kind ,kind))) (lsp-ui-peek-find-custom 'vars "$ccls/vars" `(:kind ,kind)))
(defun ccls/base (level) (defun ccls/base (levels)
(lsp-ui-peek-find-custom 'base "$ccls/inheritance" `(:level ,level))) (lsp-ui-peek-find-custom 'base "$ccls/inheritance" `(:levels ,levels)))
(defun ccls/derived (level) (defun ccls/derived (levels)
(lsp-ui-peek-find-custom 'derived "$ccls/inheritance" `(:level ,level :derived t))) (lsp-ui-peek-find-custom 'derived "$ccls/inheritance" `(:levels ,levels :derived t)))
(defun ccls/member () (defun ccls/member ()
(interactive) (interactive)
(lsp-ui-peek-find-custom 'member "$ccls/member")) (lsp-ui-peek-find-custom 'member "$ccls/member"))

8
FAQ.md

@ -165,7 +165,7 @@ 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/memberHierarchy flat:true derived:false` ### `$ccls/member derived:false`
* <code>struct <kbd>A</kbd>:B{void <kbd>f</kbd>()override;};</code> lists `B` or `B::f()` * <code>struct <kbd>A</kbd>:B{void <kbd>f</kbd>()override;};</code> lists `B` or `B::f()`
@ -178,20 +178,20 @@ ccls will save a file in `cacheDirectory`:
* <code><kbd>A</kbd> <kbd>a</kbd>;</code> lists all instances of user-defined `A`. * <code><kbd>A</kbd> <kbd>a</kbd>;</code> lists all instances of user-defined `A`.
* <code>int <kbd>i</kbd>;</code> lists all instances of `int`. * <code>int <kbd>i</kbd>;</code> lists all instances of `int`.
### [`$ccls/callHierarchy`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_callHierarchy.cc) ### [`$ccls/call`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_call.cc)
```elisp ```elisp
(ccls-call-hierarchy nil) ; caller hierarchy (ccls-call-hierarchy nil) ; caller hierarchy
(ccls-call-hierarchy t) ; callee hierarchy (ccls-call-hierarchy t) ; callee hierarchy
``` ```
### [`$ccls/inheritanceHierarchy`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_inheritanceHierarchy.cc) ### [`$ccls/inheritance`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_inheritance.cc)
```elisp ```elisp
(ccls-inheritance-hierarchy nil) ; base hierarchy (ccls-inheritance-hierarchy nil) ; base hierarchy
(ccls-inheritance-hierarchy t) ; derived hierarchy (ccls-inheritance-hierarchy t) ; derived hierarchy
``` ```
### [`$ccls/memberHierarchy`](https://github.com/MaskRay/ccls/blob/master/src/messages/ccls_memberHierarchy.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 members of a record type. 😂 nobody has implemented vscode-ccls UI for the feature. Help wanted!

@ -77,7 +77,7 @@ nn <silent> xl :call LanguageClient#findLocations({'method':'$ccls/navigate','di
nn <silent> xb :call LanguageClient#findLocations({'method':'$ccls/inheritance'})<cr> nn <silent> xb :call LanguageClient#findLocations({'method':'$ccls/inheritance'})<cr>
" bases of up to 3 levels " bases of up to 3 levels
nn <silent> xB :call LanguageClient#findLocations({'method':'$ccls/inheritance','levels':3})<cr> nn <silent> xB :call LanguageClient#findLocations({'method':'$ccls/inheritance','levels':3})<cr>
" derived of up to 3 levels " derived
nn <silent> xd :call LanguageClient#findLocations({'method':'$ccls/inheritance','derived':v:true})<cr> nn <silent> xd :call LanguageClient#findLocations({'method':'$ccls/inheritance','derived':v:true})<cr>
" derived of up to 3 levels " derived of up to 3 levels
nn <silent> xD :call LanguageClient#findLocations({'method':'$ccls/inheritance','derived':v:true,'levels':3})<cr> nn <silent> xD :call LanguageClient#findLocations({'method':'$ccls/inheritance','derived':v:true,'levels':3})<cr>