mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-24 12:26:05 -05:00
Clean up emacs parenthesis config
This commit is contained in:
parent
e1d0fbe83e
commit
b24d977b8b
@ -639,7 +639,7 @@ when idling on a completion candidate.
|
|||||||
(use-package company-quickhelp
|
(use-package company-quickhelp
|
||||||
:hook (company-mode . company-quickhelp-mode))
|
:hook (company-mode . company-quickhelp-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** smartparens
|
*** Smart Parentheses
|
||||||
smartparens handles parens for languages that aren't lispy,
|
smartparens handles parens for languages that aren't lispy,
|
||||||
and paredit handles the rest.
|
and paredit handles the rest.
|
||||||
Keybinds in =M-x sp-cheat-sheet=.
|
Keybinds in =M-x sp-cheat-sheet=.
|
||||||
@ -651,16 +651,17 @@ Keybinds in =M-x sp-cheat-sheet=.
|
|||||||
(use-package smartparens
|
(use-package smartparens
|
||||||
:diminish
|
:diminish
|
||||||
:commands smartparens-strict-mode
|
:commands smartparens-strict-mode
|
||||||
:hook (prog-mode . foltz-paren-mode)
|
|
||||||
:config
|
:config
|
||||||
(require 'smartparens-config))
|
(require 'smartparens-config))
|
||||||
|
|
||||||
(use-package evil-smartparens
|
(use-package evil-smartparens
|
||||||
:commands evil-smartparens-mode
|
|
||||||
:hook (smartparens-enabled . 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 ()
|
(defun foltz-paren-mode ()
|
||||||
"Enable a suitable paren editing mode for the current major mode"
|
|
||||||
(if (member major-mode
|
(if (member major-mode
|
||||||
'(emacs-lisp-mode
|
'(emacs-lisp-mode
|
||||||
lisp-mode
|
lisp-mode
|
||||||
@ -668,6 +669,8 @@ Keybinds in =M-x sp-cheat-sheet=.
|
|||||||
scheme-mode))
|
scheme-mode))
|
||||||
(enable-paredit-mode)
|
(enable-paredit-mode)
|
||||||
(smartparens-strict-mode)))
|
(smartparens-strict-mode)))
|
||||||
|
|
||||||
|
(add-hook 'prog-mode-hook #'foltz-paren-mode)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** evil-surround
|
*** evil-surround
|
||||||
Use =S= and a delimiter to surround in visual mode.
|
Use =S= and a delimiter to surround in visual mode.
|
||||||
|
Loading…
Reference in New Issue
Block a user