neovimclangd

Neovim Clangd LSP rename symbol doesn't change project-wide


I am using Neovim through the NVChad distribution, with the clangd language server. When I try to use the rename symbol feature, it does not rename that symbol across my entire project - just any open files (and if there are too many open, not even all open files).

How can I circumvent this to make the rename happen project-wide? It would make it a lot more convenient for refactoring. For anyone who wants my specific Neovim config, you can see it in my config repository here


Solution

  • Like @HighCommander4 suggested in the comments, setting up a compile_commands.json fixed this issue.