Visual Studio Code C/C++ extension July 2018 Update and IntelliSense auto-configuration for CMake

Last week we shipped the July 2018 update to the C/C++ extension for Visual Studio Code. In this update we added support for a new experimental API that allows build system extensions to pass IntelliSense configuration information to our extension for powering up full IntelliSense experience. You can find the full list of changes in the July 2018 update in the changelog.

As CMake has been the most requested build system for us to provide support for, we’ve been working with vector-of-bool, author of the CMake Tools extension, on an implementation using this new API to provide IntelliSense auto-configuration for CMake, and the changes are now live!

If you are using CMake and are looking for a way to auto-config IntelliSense in the C/C++ extension, be sure to check out the CMake Tools extension. If you are interested in adding IntelliSense support for other build systems, you can learn more about this new API on the npm site. We’re rolling it out as an experimental API and would love any feedback!

IntelliSense auto-configuration for CMake

After both extensions are installed, on opening any folder that contains a CMakeLists.txt file in the root, be sure to follow the steps to let the CMake Tools extension configure your project. Once completed, you will see the following message:

Simply click “Allow” to enable the CMake Tools extension to send IntelliSense configuration over to the C/C++ extension to automatically power up IntelliSense.

If you need to change the IntelliSense provider or disable the one that’s currently in use, you can use the command “C/Cpp: Change Configuration Provider…” in the Command Palette to invoke the list of providers to switch to.

We are very excited about the CMake support (thanks vector-of-bool for partnering with us!), and hope you like it too! We are also looking forward to seeing support for more build systems by leveraging this experimental extension API and any feedback you might have around this API.

Tell us what you think

Download the C/C++ extension for Visual Studio Code, try it out and let us know what you think. File issues and suggestions on GitHub. If you haven’t already provided us feedback, please take this quick survey to help shape this extension for your needs.