 
   (map! :map bibtex-mode-map "C-c \\" 'bibtex-fill-entry))
 
-
 (def-package! ivy-bibtex
   :commands ivy-bibtex)
 

(load "auctex-autoloads" nil t)
(push '("\\.[tT]e[xX]\\'" . TeX-latex-mode) auto-mode-alist)

(after! tex-site
  (setq TeX-auto-save t
        TeX-parse-self t
        TeX-save-query nil

        reftex-default-bibliography (list +latex-bibtex-default-file)
        reftex-toc-split-windows-fraction 0.2)

  (add-hook! (latex-mode LaTeX-mode) 'turn-on-reftex)

  :config
  (map! :map reftex-mode-map
        :leader :n ";" 'reftex-toc)

  (add-hook! 'reftex-toc-mode-hook
    (reftex-toc-rescan)
    (doom-hide-modeline-mode +1)
    (map! :Le "j"   'next-line
          :Le "k"   'previous-line
          :Le "q"   'kill-buffer-and-window
          :Le "ESC" 'kill-buffer-and-window)))


(def-package! bibtex ; built-in
