mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-24 04:22:50 -05:00
Add emacs smart parens
This commit is contained in:
parent
440a881d22
commit
021012e645
@ -606,7 +606,7 @@ Hotkeys for jumping to characters with =f=
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Programming Packages Configuration
|
* Programming Packages Configuration
|
||||||
** Autocompletion
|
** Autocomplete and Formatting
|
||||||
*** Company
|
*** Company
|
||||||
company auto-completes stuff in the buffer,
|
company auto-completes stuff in the buffer,
|
||||||
company-quickhelp shows documentation popups
|
company-quickhelp shows documentation popups
|
||||||
@ -639,7 +639,45 @@ 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
|
||||||
|
smartparens handles parens for languages that aren't lispy,
|
||||||
|
and paredit handles the rest.
|
||||||
|
Keybinds in =M-x sp-cheat-sheet=.
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package paredit
|
||||||
|
:diminish
|
||||||
|
:commands enable-paredit-mode)
|
||||||
|
|
||||||
|
(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))
|
||||||
|
|
||||||
|
(defun foltz-paren-mode ()
|
||||||
|
"Enable a suitable paren editing mode for the current major mode"
|
||||||
|
(if (member major-mode
|
||||||
|
'(emacs-lisp-mode
|
||||||
|
lisp-mode
|
||||||
|
lisp-interaction-mode
|
||||||
|
scheme-mode))
|
||||||
|
(enable-paredit-mode)
|
||||||
|
(smartparens-strict-mode)))
|
||||||
|
#+END_SRC
|
||||||
|
*** evil-surround
|
||||||
|
Use =S= and a delimiter to surround in visual mode.
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package evil-surround
|
||||||
|
:after evil
|
||||||
|
:diminish
|
||||||
|
:config
|
||||||
|
(global-evil-surround-mode 1))
|
||||||
|
#+END_SRC
|
||||||
** Prettification
|
** Prettification
|
||||||
*** pretty-mode
|
*** pretty-mode
|
||||||
[[https://github.com/pretty-mode/pretty-mode][Redisplay parts of the Emacs buffer as pretty symbols.]]
|
[[https://github.com/pretty-mode/pretty-mode][Redisplay parts of the Emacs buffer as pretty symbols.]]
|
||||||
|
Loading…
Reference in New Issue
Block a user