{"id":35581,"date":"2025-07-08T14:50:11","date_gmt":"2025-07-08T14:50:11","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=35581"},"modified":"2025-07-07T16:51:00","modified_gmt":"2025-07-07T16:51:00","slug":"smarter-workspace-aware-code-completions-for-c-in-vs-code","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/smarter-workspace-aware-code-completions-for-c-in-vs-code\/","title":{"rendered":"Smarter, workspace-aware code completions for C++ in VS Code"},"content":{"rendered":"<h3>C++ code understanding<\/h3>\n<p>Developing C++ code can be complex. C++ project structure, style, and convention can vary widely from repository to repository, and critical context for a given task often spans multiple files. This can require C++ developers to open and navigate across several files to fully understand a given project and author new code.<\/p>\n<p>The GitHub Copilot team has focused on two areas to improve the C++ developer experience for code completions:<\/p>\n<ul>\n<li><strong>Upgrades to the underlying completions model<\/strong> to better understand C++ syntax and patterns across diverse codebases.<\/li>\n<li><strong>Enhancing workspace awareness for C++<\/strong> so that Copilot can provide more relevant completions<\/li>\n<\/ul>\n<p>These improvements are designed to help the <a href=\"https:\/\/code.visualstudio.com\/docs\/copilot\/ai-powered-suggestions\">autocomplete-style inline GitHub Copilot code completions<\/a> be even more productive with C++ coding, minimizing manual intervention.<\/p>\n<h3>Model updates for code completions<\/h3>\n<p>The GitHub Copilot team has upgraded the base completions model to the new <a href=\"https:\/\/github.blog\/changelog\/2025-03-27-gpt-4o-copilot-your-new-code-completion-model-is-now-generally-available\/\">GPT-4o Copilot model<\/a>. This model has additional training on over 275,000 high-quality public repositories in over 30 popular programming languages (including C++) and improved latency. This base model is available across Visual Studio and VS Code by default.<\/p>\n<h3>Updates to workspace awareness for\u00a0C++ code completions<\/h3>\n<p>Additionally, with the latest improvements to GitHub Copilot code completions, Copilot can detect even more relevant context in C++ projects in order to provide more accurate code suggestions in VS Code for your specific codebase. This is now available in <a href=\"https:\/\/github.com\/microsoft\/vscode-cpptools\/releases\/tag\/v1.26.3\">the latest 1.26.3 release of the C\/C++ extension<\/a>.<\/p>\n<p>To access these improvements, ensure you are on 1.322.0 or later of the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=GitHub.copilot\">Copilot extension<\/a> and 1.26.3 or later of the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cpptools\">C\/C++ extension<\/a> with <a href=\"https:\/\/code.visualstudio.com\/docs\/cpp\/configure-intellisense\">IntelliSense configured<\/a>.<\/p>\n<h3>What&#8217;s Next?<\/h3>\n<p>We are committed to delivering similar improvements to Visual Studio 2022 17.14, so stay tuned for updates.<\/p>\n<p>Our team is working hard on improving C++ integrations with Copilot, so please let us know any other enhancements you\u2019d like to see. Share your thoughts with us on\u00a0<a href=\"https:\/\/developercommunity.visualstudio.com\/VisualStudio\/suggest\">Developer Community<\/a>\u00a0for Visual Studio or on <a href=\"https:\/\/github.com\/microsoft\/vscode\">GitHub<\/a> for VS Code to help shape what\u2019s next and how we can improve. You can also reach us via email at <a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a>\u00a0or via X at\u00a0<a href=\"https:\/\/x.com\/visualc\">@VisualC<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>C++ code understanding Developing C++ code can be complex. C++ project structure, style, and convention can vary widely from repository to repository, and critical context for a given task often spans multiple files. This can require C++ developers to open and navigate across several files to fully understand a given project and author new code. [&hellip;]<\/p>\n","protected":false},"author":85413,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,3949,275],"tags":[],"class_list":["post-35581","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-copilot-2","category-visual-studio-code"],"acf":[],"blog_post_summary":"<p>C++ code understanding Developing C++ code can be complex. C++ project structure, style, and convention can vary widely from repository to repository, and critical context for a given task often spans multiple files. This can require C++ developers to open and navigate across several files to fully understand a given project and author new code. [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/35581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/85413"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=35581"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/35581\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=35581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=35581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=35581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}