highlight-parentheses.el dynamically highlights the parentheses surrounding
point based on nesting-level using configurable lists of colors, background
colors, and other properties.
See how parens are fontified in different shades of red based on nesting level if they contain point.
Add the following to your
Enable the mode using
M-x highlight-parentheses-mode or by adding it to a hook
(add-hook 'prog-mode-hook #'highlight-parentheses-mode)
There is also the global minor mode
enables the mode in every buffer.
Furthermore, you can enable it also in the minibuffer using the following snippet:
(add-hook 'minibuffer-setup-hook #'highlight-parentheses-minibuffer-setup)
The package is available from both NonGNU ELPA, and
MELPA. With Emacs 28 (not yet released), NonGNU ELPA is
enabled by default, so you can just do
M-x package-install RET highlight-parentheses RET.
If you are using
use-package, you can use the following recipe:
(use-package highlight-parentheses :ensure t)
For asking questions, sending feedback, or patches, refer to my public inbox (mailinglist). Please mention the project you are referring to in the subject.
Bugs and requests can be reported here.
highlight-parentheses.el is licensed under the GPLv3 (or later).