Is it possible to set up VS Code with clangd on Mac?

I heard that clandg has better intellisense and autocompletion/lookup than the ms cpp extensions. Plus there is unreal-clangd extension. But I have failed to figure out how to generate the compile_commands.json on my Mac M1 Pro running Sonoma 14.5. I currently am running UE5.3 because 5.6 was getting c++ errors.

Any help appreciated!

Also, is it possible to do this without entirely compiling from source? I was also struggling with this on osx.

Does it have to be VS code? If you need to work with Unreal c++ projects on a Mac, i highly recommend Jetbrains Rider. I tried Rider on the Mac first, because working with Xcode is practically not possible. Now it’s installed on my other two Windows systems as well and i’m able to work on the same project from all that devices. Riders autocomplete is amazing and it supports Perforce oob and has its own integration plugin for Unreal. And finally, some months ago Jetbrains decided to make Rider free for non business purposes.

2 Likes

Thank you for the info about Rider! Were you able to set it up using clangd on Mac?

As far i know Rider uses the default compiler for c++ which should be Clang. Is there a special requirement for Clangd?

Just my understanding that it has really good integration with UE. But Rider is a good alternative, thank you!

Thanks again for this suggestion! I’m just starting out with it but am loving Rider so far! It is way smarter and more powerful about tracing complex type definitions thru the engine source, much better autocomplete, live integration with the UE editor, and so much more!

Thrilled that they offer a non-commercial free tier now! Woot.

1 Like

This worked well for me along with clangd VS Code extension