<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello! I'm not sure if this is the best place to ask, but it's better to get a discussion going rather than just being confused.</div><div>I tried using Clangd in Visual Studio Code, but noticed that it doesn't integrate well with the CMake Tools extension, which makes it hard to use together with a CMake workflow. I would like a way for Clangd to automatically get the correct info when CMake runs in the editor.</div><div>Specifically, I want seamless and automatic integration between these two extensions without the user having to do any additional config:</div><div><ul><li>vscode-clangd (<a href="https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd">https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd</a>)<br></li><li>CMake Tools (<a href="https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools">https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools</a>)</li></ul><div>I see three possible approaches for this:</div><div><ol><li>Work with the author of CMake Tools to make the extension generate the appropriate info for vscode-clangd</li><li>Make vscode-clangd retrieve the info from CMake Tools somehow</li><li>Create a new extension that acts as a bridge between the two</li></ol><div>Or alternatively, some combination of the different approaches.</div><div>I know that the CMake Tools extension integrates well with Microsoft's C/C++ extension, so maybe it would be a good idea to do this in a similar way that they did it. If my understanding is correct, a separate bridge extension was previously used for this, but I think they now use a combination of something similar to approach 1 and 2 for the extensions to communicate with each other.</div><div>I would be interested to hear what you all think would be the best way to go about this, and maybe I can get in touch with vector-of-bools (the author of the CMake Tools extension) about it too.<br></div><div><br></div><div>Another question I had regarding this: how does Clangd find the correct include paths and other info in the first place? Does it use some kind of compilation commands file for this? Is it possible to tell Clangd where to look for such a file? I couldn't really find any documentation about this when I looked around.</div><div><br></div><div>Cheers,</div><div>Anton Södergren<br></div></div></div></div></div></div>