Closed DougBeney closed 5 years ago
I'm not sure what I did, differently, but it works fine now. My latest config is above. Will re-open if the issue comes up again and is reproducible.
https://github.com/MaskRay/ccls/wiki/FAQ#reload
$ccls/reload
((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
).workspace/didChangeConfiguration
: reload project files and re-index if necessary.
I am trying to reload ccls whenever the
compile_commands.json
file is changed.Steps to Reproduce:
In this example, I create a really basic Qt5 project. Feel free to reproduce using a library/framework that you are more familiar with.
Step 1.: Create
hello.cpp
in empty directory with emacs:Result so far: flycheck should display an error on line 1. This is expected.
Step 2.: Generate a compile_commands.json and place it in the project root.
MyProject.pro
:Commands:
Step 3: Attempt to reload/restart lsp (or ccls) so your new compile_commands.json is picked up.
I have tried the Emacs functions
lsp-restart-workspace
andccls-reload
. I've even tried killing the ccls process to force a restart.The only solution I have right now is to completely restart emacs.
My lsp config: