1
0
mirror of https://github.com/Foltik/dotfiles synced 2024-11-24 04:22:50 -05:00

Clean up emacs parenthesis config

This commit is contained in:
Jack Foltz 2018-12-21 12:51:30 -05:00
parent e1d0fbe83e
commit b24d977b8b
Signed by: foltik
GPG Key ID: D1F0331758D1F29A

View File

@ -639,7 +639,7 @@ when idling on a completion candidate.
(use-package company-quickhelp
:hook (company-mode . company-quickhelp-mode))
#+END_SRC
*** smartparens
*** Smart Parentheses
smartparens handles parens for languages that aren't lispy,
and paredit handles the rest.
Keybinds in =M-x sp-cheat-sheet=.
@ -651,16 +651,17 @@ Keybinds in =M-x sp-cheat-sheet=.
(use-package smartparens
:diminish
:commands smartparens-strict-mode
:hook (prog-mode . foltz-paren-mode)
:config
(require 'smartparens-config))
(use-package evil-smartparens
:commands evil-smartparens-mode
:hook (smartparens-enabled . evil-smartparens-mode))
#+END_SRC
*** Smart Parentheses Modes
Picks a suitable parenthesis editing mode for the
current major mode when entering any prog-mode.
#+BEGIN_SRC emacs-lisp
(defun foltz-paren-mode ()
"Enable a suitable paren editing mode for the current major mode"
(if (member major-mode
'(emacs-lisp-mode
lisp-mode
@ -668,6 +669,8 @@ Keybinds in =M-x sp-cheat-sheet=.
scheme-mode))
(enable-paredit-mode)
(smartparens-strict-mode)))
(add-hook 'prog-mode-hook #'foltz-paren-mode)
#+END_SRC
*** evil-surround
Use =S= and a delimiter to surround in visual mode.