chore(text-editing/smartparens): move setup to a central list of hooks

This commit is contained in:
2022-12-04 01:47:11 +00:00
parent 03efc3b847
commit dad465c90a
6 changed files with 17 additions and 14 deletions

View File

@@ -33,12 +33,6 @@ Position the cursor at it's beginning, according to the current mode."
(forward-line -1)
(indent-according-to-mode))
(defun siren-wrap-with (s)
"Create a wrapper function for smartparens using S."
`(lambda (&optional arg)
(interactive "P")
(sp-wrap-with-pair ,s)))
(defun siren-align-region-to-equals (begin end)
"Align region (specified with BEGIN and END) to equal signs."
(interactive "r")

View File

@@ -6,6 +6,8 @@
;;; Code:
(require 'siren-smartparens)
;; Lisp configuration
(define-key read-expression-map (kbd "TAB") 'completion-at-point)

View File

@@ -10,7 +10,6 @@
(require 'siren-display-line-numbers)
(require 'siren-flyspell)
(require 'siren-move-dup)
(require 'siren-smartparens)
(use-package markdown-mode
:mode
@@ -50,8 +49,7 @@
(siren-display-fill-column t)
(siren-display-line-numbers t)
(auto-fill-mode t)
(flyspell-mode t)
(smartparens-mode t))
(flyspell-mode t))
(defun siren-markdown-mode-setup-prettier ()
"Configure prettier-js-args based on auto-fill-column mode."

View File

@@ -11,7 +11,6 @@
(require 'siren-display-line-numbers)
(require 'siren-flyspell)
(require 'siren-smart-shift)
(require 'siren-smartparens)
(use-package org
:straight (:type built-in)
@@ -93,7 +92,6 @@
(siren-display-indentation t)
(siren-display-line-numbers t)
(flyspell-mode t)
(smartparens-mode t)
(visual-line-mode t)
(whitespace-mode t))

View File

@@ -28,7 +28,10 @@
"M-R" 'sp-rewrap-sexp)
:hook
(prog-mode . smartparens-mode)
((git-commit-setup
markdown-mode
org-mode
prog-mode) . siren-smartparens-mode-enable)
:custom-face
(sp-pair-overlay-face ((t (:inherit nil))))
@@ -38,6 +41,16 @@
(sp-autoskip-closing-pair 'always)
(sp-hybrid-kill-entire-symbol nil)
:preface
(defun siren-smartparens-mode-enable ()
(smartparens-mode t))
(defun siren-wrap-with (s)
"Create a wrapper function for smartparens using S."
`(lambda (&optional arg)
(interactive "P")
(sp-wrap-with-pair ,s)))
:config
;; smart pairing for all
(require 'smartparens-config)

View File

@@ -9,7 +9,6 @@
(require 'siren-display-fill-column)
(require 'siren-display-line-numbers)
(require 'siren-flyspell)
(require 'siren-smartparens)
(require 'siren-whitespace)
(use-package magit
@@ -57,7 +56,6 @@
(siren-display-line-numbers)
(auto-fill-mode t)
(flyspell-mode t)
(smartparens-mode t)
(whitespace-mode t))
:config