diff options
author | David Morgan <djm_uk@protonmail.com> | 2021-10-12 06:39:58 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2021-10-12 06:39:58 +0100 |
commit | 97f62b0a68db5f4278fb925d27b01972981b5667 (patch) | |
tree | ef4de68e3e2e256b9d0035a7e16cb76e1966654d /.emacs.d/lisp/init-smartparens.el | |
parent | 4d593f4fa05905aa31591238f14f19bc1d034d28 (diff) | |
download | dotfiles-97f62b0a68db5f4278fb925d27b01972981b5667.tar.gz |
Add paredit splice sexp wrapper and move sp function to correct place
Diffstat (limited to '.emacs.d/lisp/init-smartparens.el')
-rw-r--r-- | .emacs.d/lisp/init-smartparens.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/.emacs.d/lisp/init-smartparens.el b/.emacs.d/lisp/init-smartparens.el index 9e8632e..fa8c122 100644 --- a/.emacs.d/lisp/init-smartparens.el +++ b/.emacs.d/lisp/init-smartparens.el @@ -10,6 +10,9 @@ (sp-hybrid-kill-entire-symbol t) (sp-hybrid-kill-excessive-whitespace t) :config + (defun sp-wrap-double-quotation-marks () + (interactive) + (sp-wrap-with-pair "\"")) ;; https://github.com/syl20bnr/spacemacs/blob/develop/layers/+spacemacs/spacemacs-editing/funcs.el (spacemacs/smart-closing-parenthesis) ;; TODO can make things unbalanced (defun sp-close-round () @@ -41,9 +44,11 @@ (require 'smartparens-config) (sp-use-paredit-bindings) (unbind-key "M-?" 'smartparens-mode-map) - (bind-key "C-M-?" 'sp-convolute-sexp 'smartparens-mode-map) - ;; :bind (:map smartparens-mode-map (")" . sp-close-round)) - ) + :commands sp-local-pair + :bind (:map smartparens-mode-map + ("C-M-?" . sp-convolute-sexp) + ;; (")" . sp-close-round) + ("M-\"" . sp-wrap-double-quotation-marks))) (provide 'init-smartparens) ;;; init-smartparens.el ends here |