mirror of
https://github.com/MaskRay/ccls.git
synced 2025-04-20 23:53:05 +00:00
$ccls/inheritanceHierarchy :flat t
parent
ae5c996b9e
commit
75ebe1c566
15
Emacs.md
15
Emacs.md
@ -112,6 +112,8 @@ Check https://github.com/emacs-lsp/lsp-ui for a supplement of lsp-mode. It provi
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
Refer to [MaskRay's doom-emacs configuration](https://github.com/MaskRay/Config/blob/master/home/.config/doom/modules/private/my-cc/autoload.el) for fine-grained `textDocument/references` (different roles: Read/Write/Dynamic/...)
|
||||||
|
|
||||||
### Symbol highlight
|
### Symbol highlight
|
||||||
|
|
||||||
The identifier (or user-defined operator) at point is highlighted with its other references. If you build trunk libclang, the references will be differentiated for different usage: read/write.
|
The identifier (or user-defined operator) at point is highlighted with its other references. If you build trunk libclang, the references will be differentiated for different usage: read/write.
|
||||||
@ -143,6 +145,19 @@ Aside from definitions/references/workspace symbol, ccls provides some LSP exten
|
|||||||
(lsp-ui-peek-find-custom 'random "$ccls/random") ;; jump to a random declaration
|
(lsp-ui-peek-find-custom 'random "$ccls/random") ;; jump to a random declaration
|
||||||
```
|
```
|
||||||
|
|
||||||
|
There are flattened versions of hierarchies with `:flat t`:
|
||||||
|
|
||||||
|
```elisp
|
||||||
|
(defun ccls/bases ()
|
||||||
|
(interactive)
|
||||||
|
(lsp-ui-peek-find-custom 'base "$ccls/inheritanceHierarchy"
|
||||||
|
(append (lsp--text-document-position-params) '(:flat t :level 3))))
|
||||||
|
(defun ccls/derived ()
|
||||||
|
(interactive)
|
||||||
|
(lsp-ui-peek-find-custom 'derived "$ccls/inheritanceHierarchy"
|
||||||
|
(append (lsp--text-document-position-params) '(:flat t :level 3 :derived t))))
|
||||||
|
```
|
||||||
|
|
||||||
### Documentation (comments)
|
### Documentation (comments)
|
||||||
|
|
||||||
lsp-ui-doc.el renders comments in a child frame (Emacs >= 26) or inline (< 26).
|
lsp-ui-doc.el renders comments in a child frame (Emacs >= 26) or inline (< 26).
|
||||||
|
10
Neovim.md
10
Neovim.md
@ -71,10 +71,10 @@ or any other
|
|||||||
### Custom cross references
|
### Custom cross references
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
nn xb :call LanguageClient#findLocations({'method':'$ccls/inheritanceHierarchy','flat':v:true,'level':3,'derived':v:false})<cr>
|
nn <silent> xb :call LanguageClient#findLocations({'method':'$ccls/inheritanceHierarchy','flat':v:true,'levels':3,'derived':v:false})<cr>
|
||||||
nn xd :call LanguageClient#findLocations({'method':'$ccls/inheritanceHierarchy','flat':v:true,'level':3,'derived':v:true})<cr>
|
nn <silent> xd :call LanguageClient#findLocations({'method':'$ccls/inheritanceHierarchy','flat':v:true,'levels':3,'derived':v:true})<cr>
|
||||||
nn xe :call LanguageClient#findLocations({'method':'$ccls/callers'})<cr>
|
nn <silent> xe :call LanguageClient#findLocations({'method':'$ccls/callers'})<cr>
|
||||||
nn xv :call LanguageClient#findLocations({'method':'$ccls/vars'})<cr>
|
nn <silent> xv :call LanguageClient#findLocations({'method':'$ccls/vars'})<cr>
|
||||||
nn xV :call LanguageClient#findLocations({'method':'$ccls/vars','kind':1})<cr>
|
nn <silent> xV :call LanguageClient#findLocations({'method':'$ccls/vars','kind':1})<cr>
|
||||||
nn xx x
|
nn xx x
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user