FAQ: reload methods

Fangrui Song 2019-07-25 21:43:00 -07:00
parent c7cc9e6c44
commit b4ebdd641d

6
FAQ.md

@ -317,6 +317,12 @@ Sample requests:
{"jsonrpc":"2.0","id":3,"method":"$ccls/member","params":{"textDocument":{"uri":"file:///tmp/c/a.cc"},"position":{"line":0,"character":7},"kind":2}} {"jsonrpc":"2.0","id":3,"method":"$ccls/member","params":{"textDocument":{"uri":"file:///tmp/c/a.cc"},"position":{"line":0,"character":7},"kind":2}}
``` ```
## Reload
* Notification `$ccls/reload`: reset global index and reload index files. This is useful if you have modified a common header file and you expect all opened files to be re-indexed. Note, this doesn't reload project files (`compile_commands.json` and `.ccls`).
* Notification `workspace/didChangeConfiguration`: reload project files and re-index if necessary.
* Restart the ccls process. Some language clients can restart the language server (e.g. lsp-mode `lsp-restart-workspace`).
## Cases ## Cases
On a laptop with one (i7-6600U CPU @ 2.60GHz, hyper-threading, `nproc`=4), 4 On a laptop with one (i7-6600U CPU @ 2.60GHz, hyper-threading, `nproc`=4), 4