                    #'LaTeX-math-mode
                    #'latex-preview-pane-enable
                    #'turn-on-cdlatex
-                   #'turn-on-reftex)
+                   #'turn-on-reftex
+                   (lambda () (setq TeX-command-default "xelatexmk")))
   :config
   (push '("xelatexmk"
           "latexmk -pdf -pdflatex=\"xelatex -interaction=nonstopmode -shell-escape -synctex=1\" %s"

        TeX-view-program-list)
  (push '(output-pdf "skim") TeX-view-program-selection)
  (server-start)
  (setq TeX-command "xelatexmk"
        TeX-auto-save t
        TeX-parse-self t)
  (use-package latex-preview-pane)
  (use-package cdlatex)

(use-package haskell-mode :defer)

(use-package idris-mode
  :init (add-hook 'idris-mode-hook (lambda () (aggressive-indent-mode 0)))
  :bind (:map idris-mode-map
              ("<C-return>" . prop-menu-by-completing-read)
              ("<C-M-return>" . idris-load-file)
              ("C-c C-q" . idris-quit)))

(use-package ess
  :commands R
