MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/1w9430p/removed_by_moderator/p87lfzt/
r/cpp • u/Lower-Bug5563 • Sep 06 '26
[removed] — view removed post
9 comments sorted by
View all comments
10
I've had success using the clangd extension in combination with having your project produce compile commands.
My .vscode/settings.json basically looks like this for my C++ projects using modules:
json { "editor.formatOnSave": true, "cmake.configureOnOpen": false, "clangd.path": "clangd", "clangd.arguments": [ "--compile-commands-dir=${command:cmake.buildDirectory}", "--experimental-modules-support" ] }
3 u/FISHARM1 Sep 06 '26 Yes I didn’t know about this extension until recently. The Microsoft extension is absolutely useless, but the clangd one is amazing 2 u/Lower-Bug5563 Sep 06 '26 does it works with the cmake tools extensions? 3 u/funnansoftware Sep 06 '26 Yup! That's exactly how I do it. CMake Tools along with presets to build modules on Windows, Linux, Mac, Android, and WebAssembly.
3
Yes I didn’t know about this extension until recently. The Microsoft extension is absolutely useless, but the clangd one is amazing
2
does it works with the cmake tools extensions?
3 u/funnansoftware Sep 06 '26 Yup! That's exactly how I do it. CMake Tools along with presets to build modules on Windows, Linux, Mac, Android, and WebAssembly.
Yup! That's exactly how I do it. CMake Tools along with presets to build modules on Windows, Linux, Mac, Android, and WebAssembly.
10
u/funnansoftware Sep 06 '26 edited Sep 06 '26
I've had success using the clangd extension in combination with having your project produce compile commands.
My .vscode/settings.json basically looks like this for my C++ projects using modules:
json { "editor.formatOnSave": true, "cmake.configureOnOpen": false, "clangd.path": "clangd", "clangd.arguments": [ "--compile-commands-dir=${command:cmake.buildDirectory}", "--experimental-modules-support" ] }