[Emacs] Remove smartparens-latex, replace after! with use-package

This commit is contained in:
Lucien Cartier-Tilet 2022-06-15 21:42:18 +02:00
parent b60afb67d7
commit c8f8dcdf67
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -4240,30 +4240,12 @@ From Doom Emacs configuration:
("crefname" "{")))
#+end_src
#+begin_src elisp
(use-package smartparens-latex
:after auctex
:defer t
:straight (:build t)
:config
(let ((modes '(tex-mode plain-tex-mode latex-mode LaTeX-mode)))
;; From DoomEmacs
;; We have to use lower case modes here, because `smartparens-mode' uses
;; the same during configuration.
(dolist (open '("\\left(" "\\left[" "\\left\\{" "\\left|"
"\\bigl(" "\\biggl(" "\\Bigl(" "\\Biggl(" "\\bigl["
"\\biggl[" "\\Bigl[" "\\Biggl[" "\\bigl\\{" "\\biggl\\{"
"\\Bigl\\{" "\\Biggl\\{"
"\\lfloor" "\\lceil" "\\langle"
"\\lVert" "\\lvert" "`"))
(sp-local-pair modes open nil :actions :rem))
(sp-local-pair-modes $``$ nil :unless '(:add sp-in-math-p))))
#+end_src
#+begin_src emacs-lisp
(after! latex
(setq LaTeX-section-hook
'(LaTeX-section-heading
(use-package tex-mode
:defer t
:straight (:type built-in)
:config
(setq LaTeX-section-hook '(LaTeX-section-heading
LaTeX-section-title
LaTeX-section-toc
LaTeX-section-section