Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop VSCode from adding redundant headers

Tags:

c++

vs-code

entt

I'm working on a C++ project with VSCode and using entt.

In all of the relevant files, I add #include <entt/entt.hpp> and this gives me access to everything I need. VSCode keeps adding #include "entt/entity/fwd.hpp" I'm using the clangd and Microsoft Intellicode extensions but I can't find the setting to disable this. Does anyone know where it is?

like image 435
David Carpenter Avatar asked Sep 30 '26 15:09

David Carpenter


1 Answers

need to add --header-insertion=never to the clangd arguments in VSCodes settings.

enter image description here

like image 161
David Carpenter Avatar answered Oct 02 '26 04:10

David Carpenter