diff options
author | noa | 2024-09-18 10:28:25 +0800 |
---|---|---|
committer | noa | 2024-09-18 10:28:25 +0800 |
commit | 8a84472cbfff5be2dffcdee47529af206d739a8b (patch) | |
tree | 337980922cc727c5ce9c5929e8f5d85855bc3c5e /emacs/init.el | |
parent | 3b44186bc9d3c6acb4b7821ac9c531c82900d38f (diff) |
Convert show-paren-mode to use-package
Diffstat (limited to 'emacs/init.el')
-rw-r--r-- | emacs/init.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/emacs/init.el b/emacs/init.el index ea19545..673211e 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -120,14 +120,12 @@ ;; I see no reason not to immediately show which chords in a key sequence i have already pressed. Emacs does, however, and instead of letting me set the value of echo-keystrokes to zero to wait zero seconds to show that information, it repurposes zero as a method of disabling the functionality altogether, and provides no special functionality for setting it to nil that would explain why that's not an acceptable method of disabling a feature. Instead, i have to deal with setting it to nearly zero, and luckily i can't tell the difference. (setopt echo-keystrokes 0.1) -;; 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. -(setopt 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. -(setopt show-paren-when-point-inside-paren t) +(use-package paren + :custom + (show-paren-mode t) + (show-paren-when-point-in-periphery t) ; Highlight nearby paren if only whitespace separates paren from point + (show-paren-when-point-inside-paren t) ; Highlight paren if point is inside, not just on + ) ;; Syntax highlighting (setopt global-font-lock-mode t) |