 ;;; lang/latex/config.el
-
-;; TODO Test me
 
 (defvar +latex-bibtex-dir "~/work/writing/biblio/"
   "Where bibtex files are kept.")

;; Plugins
;;

(def-package! auctex
  :mode ("\\.tex$" . LaTeX-mode)
  :init
  (add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
  :config
  (setq TeX-auto-save t
        TeX-parse-self t
        TeX-source-correlate-start-server nil
        LaTeX-fill-break-at-separators nil)

  (add-hook! LaTeX-mode '(LaTeX-math-mode TeX-source-correlate-mode))

  (set! :company-backend 'LaTeX-mode '(company-auctex)))

(def-package! company-auctex)


(def-package! bibtex ; built-in

  (map! :map bibtex-mode-map "C-c \\" 'bibtex-fill-entry))


(def-package! ivy-bibtex
  :commands ivy-bibtex)

