aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Wilken2022-12-01 00:57:53 +0100
committerTimo Wilken2022-12-01 00:58:38 +0100
commit0794482e11434f7c1c12b93f9e1fa4686244bf74 (patch)
treeb352e4db72ce07ea903998428bf7df272068023c
parent298f4f2dda9de80a2ee821d29cebb3e99949bc07 (diff)
Replace smartparens with electric-pair-mode
-rw-r--r--emacs-init.el18
-rw-r--r--home-configuration.scm1
2 files changed, 1 insertions, 18 deletions
diff --git a/emacs-init.el b/emacs-init.el
index 81e3807b..86b71686 100644
--- a/emacs-init.el
+++ b/emacs-init.el
@@ -29,6 +29,7 @@
(tooltip-mode nil "Show tooltips in the echo area instead.")
(global-hl-line-mode t "Highlight the current line in all buffers.")
(column-number-mode t "Show the column number in the statusline.")
+ (electric-pair-mode t "Auto-pair suitable characters like parentheses.")
(backup-directory-alist (("." . ,(tw/xdg-emacs-subdir 'data "backup"))) "Save all backup files in one place to avoid clutter.")
(scroll-up-aggressively 0.0 "Don't recenter the window if the point moves off the page.")
(scroll-down-aggressively 0.0 "Don't recenter the window if the point moves off the page.")
@@ -463,23 +464,6 @@
:hook markdown-mode)
;; Lisp features
-(use-package smartparens
- :commands (smartparens-global-mode) :demand t
- :config
- (smartparens-global-mode +1)
- (defun tw/sp-no-pair-single-quotes-p (id action context)
- "Return whether ` and ' shouldn't be auto-paired in the current `major-mode'."
- (memq major-mode (cons 'minibuffer-mode sp-lisp-modes)))
- ;; Don't auto-pair ` and ' chars in Lisp modes or the minibuffer.
- ;; Modify the global pair to not apply there.
- ;; The CLOSE parameter is not used in this case, so it is nil.
- (sp-pair "`" nil :unless '(tw/sp-no-pair-single-quotes-p))
- (sp-pair "'" nil :unless '(tw/sp-no-pair-single-quotes-p
- sp-in-comment-p sp-in-string-p))
- (sp-local-pair 'lisp-mode "`" "'"
- :actions '(wrap insert autoskip)
- :when '(sp-in-comment-p sp-in-string-p))
- :functions (sp-pair sp-local-pair))
(use-package aggressive-indent
:hook (; scheme-mode
diff --git a/home-configuration.scm b/home-configuration.scm
index 8f857754..084c6f88 100644
--- a/home-configuration.scm
+++ b/home-configuration.scm
@@ -447,7 +447,6 @@ replacement spec (to which `regexp-substitute/global' is applied)."
"emacs-evil-surround"
;; "emacs-evil-owl" ; tests failing
"emacs-evil-args"
- "emacs-evil-smartparens"
"emacs-evil-numbers"
"emacs-evil-multiedit"
"emacs-evil-goggles"