Minor refactor across the board

This commit is contained in:
Henrik Lissner 2019-03-04 20:44:35 -05:00
parent dd0d264a27
commit fbcb4e6973
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
7 changed files with 24 additions and 24 deletions

View file

@ -14,7 +14,7 @@
(let* ((offset LaTeX-indent-level)
(contin (or (and (boundp '+latex-indent-level-item-continuation)
+latex-indent-level-item-continuation)
(* 4 LaTeX-indent-level)))
(* 4 offset)))
(re-beg "\\\\begin{")
(re-end "\\\\end{")
(re-env "\\(itemize\\|\\enumerate\\|description\\)")
@ -37,8 +37,7 @@
indent)
((looking-at "\\\\item")
(+ offset indent))
(t
(+ contin indent))))))
((+ contin indent))))))
;;;###autoload
(defun +latex-symbols-company-backend (command &optional arg &rest _ignored)

View file

@ -54,6 +54,8 @@ If no viewers are found, `latex-preview-pane' is used.")
(add-hook 'TeX-mode-hook #'visual-line-mode)
;; Fold TeX macros
(add-hook 'TeX-mode-hook #'TeX-fold-mode)
;; Enable rainbow mode after applying styles to the buffer
(add-hook 'TeX-mode-hook #'rainbow-delimiters-mode)
;; display output of latex commands in popup
(set-popup-rule! " output\\*$" :size 15)
;; Do not prompt for Master files, this allows auto-insert to add templates to
@ -63,10 +65,7 @@ If no viewers are found, `latex-preview-pane' is used.")
(remove-hook 'find-file-hook
(cl-find-if #'byte-code-function-p find-file-hook)
'local))
;; Enable rainbow mode after applying styles to the buffer
(add-hook 'TeX-update-style-hook #'rainbow-delimiters-mode)
(when (featurep! :tools flyspell)
(add-hook 'latex-mode-local-vars-hook #'flyspell-mode))
(add-hook 'latex-mode-local-vars-hook #'flyspell-mode!)
;; All these excess pairs dramatically slow down typing in latex buffers, so
;; we remove them. Let snippets do their job.
(after! smartparens-latex