Skip to content

Commit 1c5d401

Browse files
committed
fixup! [clangd] Add CodePatterns config option under Completion
This last condition is here to allow user to get autocomplete suggestion when inside an include expression
1 parent 1430d62 commit 1c5d401

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang-tools-extra/clangd/CodeComplete.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,7 @@ struct CompletionRecorder : public CodeCompleteConsumer {
954954
if (Config::current().Completion.CodePatterns ==
955955
Config::CodePatternsPolicy::None &&
956956
Result.Kind == CodeCompletionResult::RK_Pattern &&
957+
// keep allowing the include files autocomplete suggestions
957958
ContextKind != CodeCompletionContext::CCC_IncludedFile)
958959
continue;
959960
// Class members that are shadowed by subclasses are usually noise.

0 commit comments

Comments
 (0)