mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-29 02:51:57 +00:00
coc.nvim: mention LSP-Extensions.md and coc-snippets
parent
7059a9bed2
commit
085ff9bad3
31
coc.nvim.md
31
coc.nvim.md
@ -8,7 +8,7 @@ Open config file with command `:CocConfig`
|
||||
"ccls": {
|
||||
"command": "ccls",
|
||||
"filetypes": ["c", "cpp", "cuda", "objc", "objcpp"],
|
||||
"rootPatterns": [".ccls", "compile_commands.json", ".vim/", ".git/", ".hg/"],
|
||||
"rootPatterns": [".ccls-root", "compile_commands.json"],
|
||||
"initializationOptions": {
|
||||
"cache": {
|
||||
"directory": ".ccls-cache"
|
||||
@ -48,24 +48,16 @@ au CursorHold * sil call CocActionAsync('highlight')
|
||||
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
|
||||
"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>
|
||||
```
|
||||
See [[client.snippetSupport and completion.placeholder|Customization#clientsnippetsupport]] for customization of snippet expansion.
|
||||
|
||||
### Cross reference extensions
|
||||
|
||||
See [[LSP Extensions]] for the description of these extensions.
|
||||
|
||||
```vim
|
||||
" bases
|
||||
nn <silent> xb :call CocLocations('ccls','$ccls/inheritance')<cr>
|
||||
@ -95,3 +87,14 @@ nn <silent> xV :call CocLocations('ccls','$ccls/vars',{'kind':1})<cr>
|
||||
|
||||
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