Solved How do I configure VS code

How did you get "clangd" to work on VS Code, I can not install the language server for clangd.
It's probably already installed, but is called clangd13 instead of plain clangd. It's been a while, but I believe I didn't use it. I believe I used a compile_commands.json file I generated somewhat painfully.

Look at section 3.2 here for clangd:

And at section 4.1 for using scan-build.py to generate a compile_commands.json file.
 
It's probably already installed, but is called clangd13 instead of plain clangd. It's been a while, but I believe I didn't use it. I believe I used a compile_commands.json file I generated somewhat painfully.

Look at section 3.2 here for clangd:

And at section 4.1 for using scan-build.py to generate a compile_commands.json file.

Thanks for the reply.

I used the command from section "4.1.2. Using devel/bear" and it was still building after 1 hour, I stopped it since I assumed that guide was not going to make clangd language server work on VS code since it was building FreeBSD kernel code, I need clangd for general purpose like for OpenCV:
bear --append -- make buildworld buildkernel -j`sysctl -n hw.ncpu`


I guess I will let it build over night or maybe use the python script hopefully build faster. Have no idea what it's doing taking so long.
 
I didn't use devel/bear. I used the scan-build that is not included with LLVM. I.e.
Code:
pip install scan-build --user
~/.local/bin/intercept-build build-command

The build command has to be customized for the particular project you're working on. It might be as simple as:
Code:
cd myproject
~/.local/bin/intercept-build make

I forget why I didn't use devel/bear. I think it didn't work for me, for some reason, but I also don't remember using the port. Maybe I just didn't find the port, and whatever I downloaded didn't work 🤦
 
Back
Top