-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clangd using clangd fallback even after loading compilation database #2025
Comments
Edit: After more digging, I found out it is due to the compilation database path being set to ubuntu paths, after changing /home/user to z:, I am now getting the correct command for clangd, but I now get Also, clangd only indexes a single file (currently open one), is there a way to index and link all the files in the project from the compilation database? -log=verbose |
That should happen by default. The log might contain clues as to why it's not working. Feel free to share a log for help analyzing it. |
I tried to get it to work by searching a variable in entire folder. But I am getting error "Failed to load shard: " for all the files in folder |
I'm not sure what you mean by that.
I don't think that necessarily indicates a problem, I think that's printed whenever index files are out of date and need to be rebuilt. |
Running clangd restart language server after providing compile_commands.json path does not link all functions in project.
Clangd only running for the currently open file instead of all files in project, and using fallback mode even after detecting .json file
(${workspaceFolder}\Main\Build, workspace is at z:\Perforce\MyProject)
Ctrl+click does not link to any structs or functions outside the current file (even header file)
Logs
I[17:52:12.349] <-- textDocument/didOpen
I[17:52:13.659] Loaded compilation database from z:\Perforce\MyProject\Main\Build\compile_commands.json
V[17:52:13.661] Broadcasting compilation database from z:\Perforce\MyProject\Main\Build
I[17:52:13.661] ASTWorker building file z:\Perforce\MyProject\Main\Butterfly\Function\Folder\Advanced\Feature\Feature.c version 1 with command clangd fallback
System information
Output of
clangd --version
: 18.1.3Editor/LSP plugin: VSCode
Operating system: Windows
The text was updated successfully, but these errors were encountered: