aboutsummaryrefslogtreecommitdiff
path: root/emacs-init.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs-init.el')
-rw-r--r--emacs-init.el18
1 files changed, 1 insertions, 17 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