Force reindex

Is it possible to force clangd to reindex when for example the compile_commands.json has changed? What happens when I change Git branch? I can easily generate a new compile_commands.json for the new branch but do clangd pick this up?

1 Like

No clangd (currently) only invalidates cached index shards if file contents has changed.

If you want to force re-indexing from scratch you should delete shards that are located next to compile_commands.json, either in .clangd/index/* (before clangd-11) or .cache/clangd/index* (clangd-11).