diff options
author | Sam McCall <sam.mccall@gmail.com> | 2019-04-10 12:15:35 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2019-04-10 12:15:35 +0000 |
commit | 9b765de6dd1722e23d02feb98a3624474a57c680 (patch) | |
tree | dd2e005945cc685364c0f4d4cd346c0e32946099 /clang-tools-extra/clangd/CodeComplete.h | |
parent | 6f9978319faf097f535977a63a4d78b3bffbac11 (diff) | |
download | llvm-9b765de6dd1722e23d02feb98a3624474a57c680.tar.gz |
[clangd] Add -header-insertion=never flag to disable include insertion in code completion
Summary: One clear use case: use with an editor that reacts poorly to edits above the cursor.
Reviewers: ioeric
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D60409
llvm-svn: 358075
Diffstat (limited to 'clang-tools-extra/clangd/CodeComplete.h')
-rw-r--r-- | clang-tools-extra/clangd/CodeComplete.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.h b/clang-tools-extra/clangd/CodeComplete.h index aced6bef7d5b..e1110dccc0de 100644 --- a/clang-tools-extra/clangd/CodeComplete.h +++ b/clang-tools-extra/clangd/CodeComplete.h @@ -68,6 +68,11 @@ struct CodeCompleteOptions { /// If more results are available, we set CompletionList.isIncomplete. size_t Limit = 0; + enum IncludeInsertion { + IWYU, + NeverInsert, + } InsertIncludes = IncludeInsertion::IWYU; + /// A visual indicator to prepend to the completion label to indicate whether /// completion result would trigger an #include insertion or not. struct IncludeInsertionIndicator { |