vscode-clangd
vscode-clangd copied to clipboard
Streamline vscode-clangd setup
Hello! It is a great thing that you're doing here, providing a free alternative to the often slow and resource hungry C++ language server!
However, I find the vscode-clangd
setup unclear - the documentation lacks clear migration guide from MS' C/C++ extension, which usually means it is intended as a drop-in replacement.
But this is not the case too - and extension doesn't look into the .vscode/c_cpp_properties.json
file to pickup at least basic settings, like paths to the compile_commands.json
. Instead, it implicitly expects the --compile-commands-dir
option. This has an additional downside, specifically that it doesn't support configurations - i.e. not possible to provide multiple different configurations for different platforms, and different build configurations, which makes it harder to do fire-and-forget type of setup for a big project.
Here's what I think can help make the onboarding process for the new users easier (from simplest to hardest, but most helpful):
- Migration guide, at least couple short hints of what should be done in the extension/github readme page.
- Toasts that convey improper
clangd
setup (similar to the C/C++ IntelliSense disable prompt). - Implementing a drop-in replacement, i.e. MS C/C++ VSCode extension is a de-facto standard - and it will reduce friction significantly if the vscode-clangd will just parse the
.vscode/c_cpp_properties.json
at least to get switchable configs and set up compile commands dir, and also setting up reasonable defaults for clangd arguments.
Thank you and keep up the good work!