[clang-tools-extra] [clangd] Add `HeaderInsertion` yaml config option (PR #128503)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 9 16:44:20 PDT 2025
================
@@ -151,6 +151,15 @@ struct Config {
ArgumentListsPolicy ArgumentLists = ArgumentListsPolicy::FullPlaceholders;
} Completion;
+ enum class HeaderInsertionPolicy {
+ IWYU, // Include what you use
+ NeverInsert // Never insert headers as part of code completion
+ };
+
+ struct {
+ HeaderInsertionPolicy Policy = HeaderInsertionPolicy::IWYU;
+ } HeaderInsertion;
----------------
HighCommander4 wrote:
Since header insertion is a side effect of accepting of code completion proposal, it would make sense to have this option under `Completion` rather than at the top level.
https://github.com/llvm/llvm-project/pull/128503
More information about the cfe-commits
mailing list