diff --git a/.clang-format b/.clang-format
index d43e884..28e3328 100644
--- a/.clang-format
+++ b/.clang-format
@@ -87,7 +87,7 @@
 IndentWrappedFunctionNames: true
 InsertNewlineAtEOF: true
 KeepEmptyLinesAtTheStartOfBlocks: false
-LambdaBodyIndentation: OuterScope
+LambdaBodyIndentation: Signature
 LineEnding: LF
 MacroBlockBegin: ''
 MacroBlockEnd:   ''
@@ -98,13 +98,14 @@
 ObjCSpaceBeforeProtocolList: true
 PackConstructorInitializers: BinPack
 PenaltyBreakAssignment: 25
-PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakBeforeFirstCallParameter: 50
 PenaltyBreakComment: 300
 PenaltyBreakFirstLessLess: 120
 PenaltyBreakString: 1000
+PenaltyBreakTemplateDeclaration: 10
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
-PenaltyIndentedWhitespace: 0
+PenaltyIndentedWhitespace: 1
 PointerAlignment: Left
 QualifierAlignment: Left
 ReferenceAlignment: Left
diff --git a/src/sdeventplus/event.cpp b/src/sdeventplus/event.cpp
index 0c9d0d9..92b2afe 100644
--- a/src/sdeventplus/event.cpp
+++ b/src/sdeventplus/event.cpp
@@ -17,8 +17,7 @@
 
 Event::Event(sd_event* event, std::false_type,
              const internal::SdEvent* sdevent) :
-    sdevent(sdevent),
-    event(std::move(event), sdevent, true)
+    sdevent(sdevent), event(std::move(event), sdevent, true)
 {}
 
 Event::Event(const Event& other, sdeventplus::internal::NoOwn) :
diff --git a/src/sdeventplus/event.hpp b/src/sdeventplus/event.hpp
index 8b3e9ce..bbaabe1 100644
--- a/src/sdeventplus/event.hpp
+++ b/src/sdeventplus/event.hpp
@@ -165,8 +165,8 @@
                      bool& owned);
 
     const internal::SdEvent* sdevent;
-    stdplus::Copyable<sd_event*, const internal::SdEvent*, bool>::Handle<drop,
-                                                                         ref>
+    stdplus::Copyable<sd_event*, const internal::SdEvent*,
+                      bool>::Handle<drop, ref>
         event;
 };
 
diff --git a/src/sdeventplus/internal/sdevent.cpp b/src/sdeventplus/internal/sdevent.cpp
index f3bdeb3..3a17408 100644
--- a/src/sdeventplus/internal/sdevent.cpp
+++ b/src/sdeventplus/internal/sdevent.cpp
@@ -27,19 +27,16 @@
     return ::sd_event_unref(event);
 }
 
-int SdEventImpl::sd_event_add_io(sd_event* event, sd_event_source** source,
-                                 int fd, uint32_t events,
-                                 sd_event_io_handler_t callback,
-                                 void* userdata) const
+int SdEventImpl::sd_event_add_io(
+    sd_event* event, sd_event_source** source, int fd, uint32_t events,
+    sd_event_io_handler_t callback, void* userdata) const
 {
     return ::sd_event_add_io(event, source, fd, events, callback, userdata);
 }
 
-int SdEventImpl::sd_event_add_time(sd_event* event, sd_event_source** source,
-                                   clockid_t clock, uint64_t usec,
-                                   uint64_t accuracy,
-                                   sd_event_time_handler_t callback,
-                                   void* userdata) const
+int SdEventImpl::sd_event_add_time(
+    sd_event* event, sd_event_source** source, clockid_t clock, uint64_t usec,
+    uint64_t accuracy, sd_event_time_handler_t callback, void* userdata) const
 {
     return ::sd_event_add_time(event, source, clock, usec, accuracy, callback,
                                userdata);
diff --git a/src/sdeventplus/internal/sdevent.hpp b/src/sdeventplus/internal/sdevent.hpp
index ceab0fe..ee73259 100644
--- a/src/sdeventplus/internal/sdevent.hpp
+++ b/src/sdeventplus/internal/sdevent.hpp
@@ -23,18 +23,16 @@
     virtual int sd_event_add_io(sd_event* event, sd_event_source** source,
                                 int fd, uint32_t events, sd_event_io_handler_t,
                                 void* userdata) const = 0;
-    virtual int sd_event_add_time(sd_event* event, sd_event_source** source,
-                                  clockid_t clock, uint64_t usec,
-                                  uint64_t accuracy,
-                                  sd_event_time_handler_t callback,
-                                  void* userdata) const = 0;
+    virtual int sd_event_add_time(
+        sd_event* event, sd_event_source** source, clockid_t clock,
+        uint64_t usec, uint64_t accuracy, sd_event_time_handler_t callback,
+        void* userdata) const = 0;
     virtual int sd_event_add_signal(sd_event* event, sd_event_source** source,
                                     int sig, sd_event_signal_handler_t callback,
                                     void* userdata) const = 0;
-    virtual int sd_event_add_child(sd_event* event, sd_event_source** source,
-                                   pid_t, int options,
-                                   sd_event_child_handler_t callback,
-                                   void* userdata) const = 0;
+    virtual int sd_event_add_child(
+        sd_event* event, sd_event_source** source, pid_t, int options,
+        sd_event_child_handler_t callback, void* userdata) const = 0;
     virtual int sd_event_add_defer(sd_event* event, sd_event_source** source,
                                    sd_event_handler_t callback,
                                    void* userdata) const = 0;
@@ -69,15 +67,12 @@
     virtual void* sd_event_source_set_userdata(sd_event_source* source,
                                                void* userdata) const = 0;
 
-    virtual int
-        sd_event_source_get_description(sd_event_source* source,
-                                        const char** description) const = 0;
-    virtual int
-        sd_event_source_set_description(sd_event_source* source,
-                                        const char* description) const = 0;
-    virtual int
-        sd_event_source_set_prepare(sd_event_source* source,
-                                    sd_event_handler_t callback) const = 0;
+    virtual int sd_event_source_get_description(
+        sd_event_source* source, const char** description) const = 0;
+    virtual int sd_event_source_set_description(
+        sd_event_source* source, const char* description) const = 0;
+    virtual int sd_event_source_set_prepare(
+        sd_event_source* source, sd_event_handler_t callback) const = 0;
     virtual int sd_event_source_get_pending(sd_event_source* source) const = 0;
     virtual int sd_event_source_get_priority(sd_event_source* source,
                                              int64_t* priority) const = 0;
diff --git a/src/sdeventplus/source/base.cpp b/src/sdeventplus/source/base.cpp
index 4975d69..75d759c 100644
--- a/src/sdeventplus/source/base.cpp
+++ b/src/sdeventplus/source/base.cpp
@@ -157,8 +157,8 @@
 
 int Base::prepareCallback(sd_event_source* source, void* userdata)
 {
-    return sourceCallback<Callback, Base, &Base::get_prepare>("prepareCallback",
-                                                              source, userdata);
+    return sourceCallback<Callback, Base, &Base::get_prepare>(
+        "prepareCallback", source, userdata);
 }
 
 namespace detail
diff --git a/src/sdeventplus/source/event.cpp b/src/sdeventplus/source/event.cpp
index 64601ca..c0730e3 100644
--- a/src/sdeventplus/source/event.cpp
+++ b/src/sdeventplus/source/event.cpp
@@ -59,8 +59,8 @@
 
 EventBaseData::EventBaseData(const EventBase& base,
                              EventBase::Callback&& callback) :
-    EventBase(base, sdeventplus::internal::NoOwn()),
-    BaseData(base), callback(std::move(callback))
+    EventBase(base, sdeventplus::internal::NoOwn()), BaseData(base),
+    callback(std::move(callback))
 {}
 
 } // namespace detail
diff --git a/src/sdeventplus/source/time.cpp b/src/sdeventplus/source/time.cpp
index 956bd67..d26174b 100644
--- a/src/sdeventplus/source/time.cpp
+++ b/src/sdeventplus/source/time.cpp
@@ -87,12 +87,12 @@
                                          Accuracy accuracy)
 {
     sd_event_source* source;
-    SDEVENTPLUS_CHECK("sd_event_add_time",
-                      event.getSdEvent()->sd_event_add_time(
-                          event.get(), &source, static_cast<clockid_t>(Id),
-                          SdEventDuration(time.time_since_epoch()).count(),
-                          SdEventDuration(accuracy).count(), timeCallback,
-                          nullptr));
+    SDEVENTPLUS_CHECK(
+        "sd_event_add_time",
+        event.getSdEvent()->sd_event_add_time(
+            event.get(), &source, static_cast<clockid_t>(Id),
+            SdEventDuration(time.time_since_epoch()).count(),
+            SdEventDuration(accuracy).count(), timeCallback, nullptr));
     return source;
 }
 
@@ -116,8 +116,8 @@
 template <ClockId Id>
 TimeData<Id>::TimeData(const Time<Id>& base,
                        typename Time<Id>::Callback&& callback) :
-    Time<Id>(base, sdeventplus::internal::NoOwn()),
-    BaseData(base), callback(std::move(callback))
+    Time<Id>(base, sdeventplus::internal::NoOwn()), BaseData(base),
+    callback(std::move(callback))
 {}
 
 } // namespace detail
diff --git a/src/sdeventplus/utility/timer.cpp b/src/sdeventplus/utility/timer.cpp
index 5398cec..1e49d9b 100644
--- a/src/sdeventplus/utility/timer.cpp
+++ b/src/sdeventplus/utility/timer.cpp
@@ -104,8 +104,8 @@
     {
         throw std::runtime_error("Timer was never initialized");
     }
-    timeSource.set_enabled(enabled ? source::Enabled::On
-                                   : source::Enabled::Off);
+    timeSource.set_enabled(
+        enabled ? source::Enabled::On : source::Enabled::Off);
 }
 
 template <ClockId Id>
@@ -189,9 +189,8 @@
 TimerData<Id>::TimerData(const Timer<Id>& base,
                          typename Timer<Id>::Callback&& callback,
                          std::optional<typename Timer<Id>::Duration> interval) :
-    Timer<Id>(base, sdeventplus::internal::NoOwn()),
-    expired(false), initialized(interval.has_value()),
-    callback(std::move(callback)),
+    Timer<Id>(base, sdeventplus::internal::NoOwn()), expired(false),
+    initialized(interval.has_value()), callback(std::move(callback)),
     clock(Event(base.timeSource.get_event(), sdeventplus::internal::NoOwn())),
     interval(interval)
 {}
diff --git a/test/event.cpp b/test/event.cpp
index b6f5699..9f814cc 100644
--- a/test/event.cpp
+++ b/test/event.cpp
@@ -120,8 +120,8 @@
 
     void SetUp()
     {
-        event = std::make_unique<Event>(expected_event, std::false_type(),
-                                        &mock);
+        event =
+            std::make_unique<Event>(expected_event, std::false_type(), &mock);
     }
 
     void TearDown()
diff --git a/test/source/base.cpp b/test/source/base.cpp
index f192546..369d6e5 100644
--- a/test/source/base.cpp
+++ b/test/source/base.cpp
@@ -56,8 +56,7 @@
 };
 
 BaseImpl::BaseImpl(const Event& event, sd_event_source* source,
-                   std::false_type) :
-    Base(event, source, std::false_type())
+                   std::false_type) : Base(event, source, std::false_type())
 {
     set_userdata(std::make_unique<BaseImplData>(*this));
 }
@@ -196,8 +195,8 @@
                     sd_event_source_set_userdata(expected_source, testing::_))
             .WillOnce(DoAll(SaveArg<1>(&userdata), Return(nullptr)));
     }
-    auto source = std::make_unique<BaseImpl>(*event, expected_source,
-                                             std::false_type());
+    auto source =
+        std::make_unique<BaseImpl>(*event, expected_source, std::false_type());
     EXPECT_CALL(mock, sd_event_source_get_userdata(expected_source))
         .WillRepeatedly(Return(userdata));
     EXPECT_FALSE(source->get_prepare());
diff --git a/test/source/io.cpp b/test/source/io.cpp
index 2a05d1e..ffb4fa6 100644
--- a/test/source/io.cpp
+++ b/test/source/io.cpp
@@ -153,8 +153,8 @@
             EXPECT_CALL(mock, sd_event_source_get_userdata(expected_source))
                 .WillRepeatedly(ReturnPointee(&userdata));
         }
-        io = std::make_unique<IO>(*event, fd, events,
-                                  [](IO&, int, uint32_t) {});
+        io =
+            std::make_unique<IO>(*event, fd, events, [](IO&, int, uint32_t) {});
     }
 
     void TearDown()
diff --git a/test/source/signal.cpp b/test/source/signal.cpp
index 4c95f3a..f04486b 100644
--- a/test/source/signal.cpp
+++ b/test/source/signal.cpp
@@ -84,11 +84,11 @@
     }
     int completions = 0;
     const struct signalfd_siginfo* return_si;
-    Signal::Callback callback = [&](Signal&,
-                                    const struct signalfd_siginfo* si) {
-        return_si = si;
-        completions++;
-    };
+    Signal::Callback callback =
+        [&](Signal&, const struct signalfd_siginfo* si) {
+            return_si = si;
+            completions++;
+        };
     Signal signal(*event, sig, std::move(callback));
     EXPECT_FALSE(callback);
     EXPECT_NE(&signal, userdata);
@@ -116,10 +116,10 @@
                                           testing::_, nullptr))
         .WillOnce(Return(-EINVAL));
     int completions = 0;
-    Signal::Callback callback = [&completions](Signal&,
-                                               const struct signalfd_siginfo*) {
-        completions++;
-    };
+    Signal::Callback callback =
+        [&completions](Signal&, const struct signalfd_siginfo*) {
+            completions++;
+        };
     EXPECT_THROW(Signal(*event, sig, std::move(callback)), SdEventError);
     EXPECT_TRUE(callback);
     EXPECT_EQ(0, completions);
diff --git a/test/source/time.cpp b/test/source/time.cpp
index 44b8228..60b7b9e 100644
--- a/test/source/time.cpp
+++ b/test/source/time.cpp
@@ -63,10 +63,10 @@
     const Time<id>::TimePoint expected_time(std::chrono::seconds{2});
     const Time<id>::Accuracy expected_accuracy(std::chrono::milliseconds{50});
     Time<id>::TimePoint saved_time;
-    Time<id>::Callback callback = [&saved_time](Time<id>&,
-                                                Time<id>::TimePoint time) {
-        saved_time = time;
-    };
+    Time<id>::Callback callback =
+        [&saved_time](Time<id>&, Time<id>::TimePoint time) {
+            saved_time = time;
+        };
 
     EXPECT_CALL(mock, sd_event_ref(expected_event))
         .WillOnce(Return(expected_event));
@@ -120,9 +120,9 @@
                 sd_event_add_time(expected_event, testing::_, CLOCK_MONOTONIC,
                                   2000000, 50000, testing::_, nullptr))
         .WillOnce(Return(-ENOSYS));
-    EXPECT_THROW(
-        Time<id>(*event, expected_time, expected_accuracy, std::move(callback)),
-        SdEventError);
+    EXPECT_THROW(Time<id>(*event, expected_time, expected_accuracy,
+                          std::move(callback)),
+                 SdEventError);
     EXPECT_TRUE(callback);
 }
 
