首页 > 解决方案 > VS Code c/cpp automatically includes hpp file

问题描述

When editing code in a file, my vscode automatically adds #include files for symbols I reference. Sometimes this is handy, but more often than not, it's an annoyance. I believe this is because vscode don't have the whole picture of all include paths in my project (it's many paths in a big complex project) even if compile_commands.json is in use. Simple question, is there a setting in vscode to prevent it from adding #include for what vscode thinks are missing symbols? PS. I'm using clangd as the intellisense backend.

标签: c++visual-studio-code

解决方案


推荐阅读