mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-17 22:20:54 +00:00
coc.nvim: mention LSP-Extensions.md and coc-snippets
parent
7059a9bed2
commit
085ff9bad3
33
coc.nvim.md
33
coc.nvim.md
@ -8,7 +8,7 @@ Open config file with command `:CocConfig`
|
|||||||
"ccls": {
|
"ccls": {
|
||||||
"command": "ccls",
|
"command": "ccls",
|
||||||
"filetypes": ["c", "cpp", "cuda", "objc", "objcpp"],
|
"filetypes": ["c", "cpp", "cuda", "objc", "objcpp"],
|
||||||
"rootPatterns": [".ccls", "compile_commands.json", ".vim/", ".git/", ".hg/"],
|
"rootPatterns": [".ccls-root", "compile_commands.json"],
|
||||||
"initializationOptions": {
|
"initializationOptions": {
|
||||||
"cache": {
|
"cache": {
|
||||||
"directory": ".ccls-cache"
|
"directory": ".ccls-cache"
|
||||||
@ -48,24 +48,16 @@ au CursorHold * sil call CocActionAsync('highlight')
|
|||||||
au CursorHoldI * sil call CocActionAsync('showSignatureHelp')
|
au CursorHoldI * sil call CocActionAsync('showSignatureHelp')
|
||||||
```
|
```
|
||||||
|
|
||||||
### `$ccls/navigate`
|
### Completion
|
||||||
|
|
||||||
Semantic navigation. Roughly,
|
Install [coc-snippets](https://github.com/neoclide/coc-snippets) to enable LSP snippets.
|
||||||
|
|
||||||
"D" => first child declaration
|
See [[client.snippetSupport and completion.placeholder|Customization#clientsnippetsupport]] for customization of snippet expansion.
|
||||||
"L" => previous declaration
|
|
||||||
"R" => next declaration
|
|
||||||
"U" => parent declaration
|
|
||||||
|
|
||||||
```vim
|
|
||||||
nn <silent><buffer> <C-l> :call CocLocations('ccls','$ccls/navigate',{'direction':'D'})<cr>
|
|
||||||
nn <silent><buffer> <C-k> :call CocLocations('ccls','$ccls/navigate',{'direction':'L'})<cr>
|
|
||||||
nn <silent><buffer> <C-j> :call CocLocations('ccls','$ccls/navigate',{'direction':'R'})<cr>
|
|
||||||
nn <silent><buffer> <C-h> :call CocLocations('ccls','$ccls/navigate',{'direction':'U'})<cr>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Cross reference extensions
|
### Cross reference extensions
|
||||||
|
|
||||||
|
See [[LSP Extensions]] for the description of these extensions.
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
" bases
|
" bases
|
||||||
nn <silent> xb :call CocLocations('ccls','$ccls/inheritance')<cr>
|
nn <silent> xb :call CocLocations('ccls','$ccls/inheritance')<cr>
|
||||||
@ -94,4 +86,15 @@ nn <silent> xv :call CocLocations('ccls','$ccls/vars')<cr>
|
|||||||
nn <silent> xV :call CocLocations('ccls','$ccls/vars',{'kind':1})<cr>
|
nn <silent> xV :call CocLocations('ccls','$ccls/vars',{'kind':1})<cr>
|
||||||
|
|
||||||
nn xx x
|
nn xx x
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `$ccls/navigate`
|
||||||
|
|
||||||
|
See [[$ccls/navigate|LSP-Extensions#cclsnavigate]]
|
||||||
|
|
||||||
|
```vim
|
||||||
|
nn <silent><buffer> <C-l> :call CocLocations('ccls','$ccls/navigate',{'direction':'D'})<cr>
|
||||||
|
nn <silent><buffer> <C-k> :call CocLocations('ccls','$ccls/navigate',{'direction':'L'})<cr>
|
||||||
|
nn <silent><buffer> <C-j> :call CocLocations('ccls','$ccls/navigate',{'direction':'R'})<cr>
|
||||||
|
nn <silent><buffer> <C-h> :call CocLocations('ccls','$ccls/navigate',{'direction':'U'})<cr>
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user