[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,34 +4240,16 @@ From Doom Emacs configuration:
("crefname" "{"))) ("crefname" "{")))
#+end_src #+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 #+begin_src emacs-lisp
(after! latex (use-package tex-mode
(setq LaTeX-section-hook :defer t
'(LaTeX-section-heading :straight (:type built-in)
LaTeX-section-title :config
LaTeX-section-toc (setq LaTeX-section-hook '(LaTeX-section-heading
LaTeX-section-section LaTeX-section-title
LaTeX-section-label) LaTeX-section-toc
LaTeX-section-section
LaTeX-section-label)
LaTeX-fill-break-at-separators nil LaTeX-fill-break-at-separators nil
LaTeX-item-indent 0)) LaTeX-item-indent 0))
#+end_src #+end_src