From 8863024422e3ccd86e2f4a7cd147e5f3917b485d Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 28 Jan 2020 04:47:57 +0100 Subject: [PATCH] Emacs: Add rainbow-delimiters. --- init.d/programming/common.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/init.d/programming/common.el b/init.d/programming/common.el index 4c77033..2f8a949 100644 --- a/init.d/programming/common.el +++ b/init.d/programming/common.el @@ -1,6 +1,6 @@ ;;; common.el --- Common programming settings. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-01-28T03:31:38+0100> +;; Time-stamp: <2020-01-28T04:47:37+0100> ;;; Commentary: @@ -265,5 +265,20 @@ year if mode is derived from prog-mode." (before-save . my/maybe-copyright-update) ) +;; Highlights parentheses, brackets or braces according to their depth. +(use-package rainbow-delimiters + :custom + (rainbow-delimiters-max-face-count 2) + + :custom-face + (rainbow-delimiters-depth-1-face ((t (:inherit rainbow-delimiters-base-face + :foreground "LightPink")))) + (rainbow-delimiters-depth-2-face ((t (:inherit rainbow-delimiters-base-face + :foreground "LightGreen")))) + + :hook + (prog-mode . rainbow-delimiters-mode) + ) + (provide 'programming/common) ;;; common.el ends here