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

@ -672,6 +672,7 @@
:desc "Command log" "L" #'global-command-log-mode
:desc "Describe mode" "M" #'describe-mode
:desc "Reload private config" "R" #'doom/reload
:desc "Describe symbol" "S" #'describe-symbol
:desc "Print Doom version" "V" #'doom/version
:desc "Apropos" "a" #'apropos
:desc "Open Bug Report" "b" #'doom/open-bug-report
@ -679,7 +680,7 @@
:desc "Describe DOOM module" "d" #'doom/describe-module
:desc "Describe function" "f" #'describe-function
:desc "Emacs help map" "h" help-map
:desc "Info" "i" #'info-lookup-symbol
:desc "Lookup in manual" "i" #'info-lookup-symbol
:desc "Describe key" "k" #'describe-key
:desc "Find library" "l" #'find-library
:desc "View *Messages*" "m" #'view-echo-area-messages

View file

@ -21,13 +21,15 @@
:config
(setq yas-verbosity (if doom-debug-mode 3 0)
yas-also-auto-indent-first-line t
yas-triggers-in-field t) ; Allow nested snippets
yas-triggers-in-field t ; Allow nested snippets
;; Remove default ~/.emacs.d/snippets
yas-snippet-dirs (delete yas--default-user-snippets-dir yas-snippet-dirs))
;; Allow private snippets in DOOMDIR/snippets
(add-to-list 'yas-snippet-dirs '+snippets-dir nil #'eq)
;; Remove GUI dropdown prompt (prefer ivy/helm)
(delq #'yas-dropdown-prompt yas-prompt-functions)
(setq yas-prompt-functions (delq 'yas-dropdown-prompt yas-prompt-functions))
;; Prioritize private snippets in `+snippets-dir' over built-in ones if there
;; are multiple choices.
(add-to-list 'yas-prompt-functions #'+snippets-prompt-private nil #'eq)

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