   :init (with-eval-after-load 'prolog
           (bind-key "<C-return>" 'ediprolog-dwim prolog-mode-map)))
 
-(use-package ess-site
-  :ensure ess
+(use-package ess
+  ;; :ensure ess -site
   :commands R
   :bind (:map ess-mode-map
               ("<C-return>" . ess-eval-line)

(use-package js2-mode
  :mode ("\\.js\\'" . js2-mode))

(use-package org-agenda
  :ensure org
  :bind ("C-; a" . org-agenda)
  :init (setq org-directory "~/Sotha_Sil/Emacs/org"
              org-agenda-files "~/Sotha_Sil/Emacs/org/agenda-files"
              org-archive-location "~/Sotha_Sil/Emacs/org/archive.org::"
              org-log-done 'time)
  (use-package ox-latex
    :mode ("\\.org\\'" . org-mode)
    :init (add-hooks 'org-mode-hook
                     #'turn-on-auto-fill
                     #'turn-on-org-cdlatex)
    (setq org-latex-create-formula-image-program 'imagemagick
          org-confirm-babel-evaluate nil
          org-latex-listings 'minted
          org-latex-packages-alist '(("" "minted"))
          org-src-fontify-natively t)))

(use-package markdown-mode
  ;; :mode
  ;; ("\\.markdown\\'" . markdown-mode)
  ;; ("\\.md\\'" . markdown-mode)
  ;; ("\\.[rR]md" . markdown-mode)
  ;; ("README\\.md\\'" . gfm-mode)
  :init
  (add-hook 'markdown-mode-hook #'visual-line-mode)
  :config
  (setq markdown-enable-math t)
  (use-package markdown-mode+)
  (defun rmarkdown-render-current-file-then-display (&optional EXTENSION)
    "Output format should be specified accordingly in YAML."


(use-package company :demand :diminish " K"
  :bind ("C-; k" . global-company-mode)
  :config (global-company-mode 1)
  (unbind-key "<tab>" company-active-map)
  (unbind-key "TAB" company-active-map)
  (use-package company-flx)
  (company-flx-mode 1)
  (use-package company-math)
  (push 'company-math-symbols-unicode company-backends)
  (use-package company-quickhelp)
  (company-quickhelp-mode 1)
  (setq company-idle-delay 0.2
        company-minimum-prefix-length 2
        company-selection-wrap-around t
        company-tooltip-align-annotations t
        company-quickhelp-delay 1))

(use-package flycheck
  :bind ("C-; f" . flycheck-mode)
  :init (hook-all #'flycheck-mode
                  'geiser-mode-hook
                  'ess-mode-hook
                  'shell-mode-hook
