Emacs tip of the day: try smartparens-strict-mode. It makes C-k keep brackets balanced! `foo(1, |bar(2))` press C-k and `foo(1, |)`. Nice!