summary refs log tree commit diff
diff options
context:
space:
mode:
authornoa@gaiwan.org2024-06-12 22:04:58 +0000
committernoa@gaiwan.org2024-06-12 22:04:58 +0000
commita578127b71cd2695f2892e27435a5795ff67d2a6 (patch)
tree37ad65035f412111588c017a46debd82c9f9eb8d
parentaa19c3b8e8d90e1de72e0298e693eadb4f36db67 (diff)
Add documentation and configuration for show-paren-mode
-rw-r--r--emacs/init.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 745f55a..3e4fcf2 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -563,7 +563,15 @@ and when JID is not in `jabber-activity-banned'."
 	tooltip-mode nil	;; show tooltips in the echo area
 	echo-keystrokes 0.1)	;; show chord progress (almost) immediately
 
-(use-package paren
+;; A useful feature when programming is to show matching parentheses.  Show-paren-mode is a global mode.  By default it runs in all buffers except those inheriting from special mode.
+(setopt
+	show-paren-mode t
+	;; This variable means that if there is no non-whitespace character in between the point and the paren, it will be highlighted.  It's useful to highlight parentheses if the point is at the start of the line and the paren is indented.
+	show-paren-when-point-in-periphery t
+	;; By default, the point has to be after a paren for it to be highlighted.  But often the point will be just inside, in which case it's also helpful for the pair to be highlighted.
+	show-paren-when-point-inside-paren t
+)
+   (use-package paren
 	:custom
 	(show-paren-mode t)