 ;;   :defer t
 ;;   :init
 ;;   (add-hook 'clojure-mode-hook 'cider-mode))
+
 (use-package monroe
   :ensure t
   :defer t
   :commands (clojure-enable-monroe)
   :init (add-hook 'clojure-mode-hook 'clojure-enable-monroe))
 
-
-(defun td/css-imenu-expressions ()
-  "TODO: docs."
-  (set (make-local-variable 'imenu-generic-expression)
-       '(("Section" "^.*\\* =\\(.+\\)$" 1)
-         (nil "^\\(.+\\)\\S*{$" 1))))
-
-(use-package css-mode
-  :mode (("\\.css$" . css-mode))
-  :config
-  (progn
-    (setq css-indent-offset 2)
-    (add-hook 'css-mode-hook #'td/css-imenu-expressions)))
-
-(use-package scss-mode
-  :ensure t
-  :mode (("\\.scss$" . scss-mode)))
-
-(use-package less-css-mode
-  :ensure t
-  :mode (("\\.less" . less-css-mode)))
-
+;;;; Elixir
+(use-package elixir-mode
+  :ensure t
+  :defer t)
+
+(use-package alchemist
+  :ensure t
+  :defer t
+  :init (add-hook 'elixir-mode-hook #'alchemist-mode))
+
+
+;;;; Python
+(use-package pyvenv
+  :ensure t
+  :defer t)
+
+
+;;;; Emacs Lisp
+(use-package elisp-mode
+  :config
+  (progn
+    (defun td/imenu-elisp-sections ()
+      (setq imenu-prev-index-position-function nil)
+      (add-to-list 'imenu-generic-expression '("Sections" "^;;;; \\(.+\\)$" 1) t))
+
+    (add-hook 'emacs-lisp-mode-hook 'td/imenu-elisp-sections)))
+;;;; Misc
 (use-package yaml-mode
   :ensure t
   :mode (("\\.yaml$" . yaml-mode)

  (setq ediff-window-setup-function 'ediff-setup-windows-plain
        ediff-split-window-function 'split-window-horizontally))

(use-package ag
  :defer t
  :ensure t)

(use-package wgrep-ag
  :defer t
  :ensure t)

(use-package editorconfig
  :defer t
  :ensure t
  :init (editorconfig-mode t))

(use-package dockerfile-mode
  :ensure t
  :mode ("Dockerfile$" . dockerfile-mode))

(use-package docker
  :ensure t
  :defer t)

(use-package paren-face
  :ensure t

               ("a" . td/vc-git-add)
               ("u" . td/vc-git-reset))))

(use-package ztree
  :ensure t
  :defer t)

(use-package workgroups2
  :ensure t
  :defer t
  :config
  (progn
    (setq wg-mode-line-decor-left-brace "["
          wg-mode-line-decor-right-brace "]")

    (add-hook 'wg-before-switch-to-workgroup-hook 'wg-save-session)))

(use-package tramp
  :defer t
  :config
  (progn
    (setq password-cache-expiry nil
          tramp-default-method "ftp")

    (add-to-list 'auth-sources "~/.emacs.d/authinfo.gpg")))

(use-package ange-ftp
  :defer t
  :config
  (setq ange-ftp-netrc-filename "~/.emacs.d/authinfo.gpg"))

(use-package org
  :defer t
  :bind (("C-c o a" . org-agenda)
         ("C-c o t" . org-todo-list))
  :config
  (progn
    (setq org-directory "~/Dropbox (Personal)/GTD/"
          org-ellipsis "…"
          org-default-notes-file (expand-file-name "inbox . org" org-directory)
          org-log-done 'time
          org-todo-keywords
          '((sequence "TODO(t)" "STARTED(s!)" "WAITING(w@/!)"
                      "|" "CANCELED(c@)" "DONE(d!)"))
          org-src-fontify-natively t
          org-src-tab-acts-natively t
          org-hide-leading-stars t)

    (setq org-agenda-files `(,org-default-notes-file)
          org-agenda-skip-unavailable-files t)

    (defun td/org-ispell ()
      "Configure `ispell-skip-region-alist' for `org-mode'."
      (make-local-variable 'ispell-skip-region-alist)
      (add-to-list 'ispell-skip-region-alist '(org-property-drawer-re))
      (add-to-list 'ispell-skip-region-alist '("~" "~"))
      (add-to-list 'ispell-skip-region-alist '("=" "="))
      (add-to-list 'ispell-skip-region-alist '("^#\\+BEGIN_SRC" . "^#\\+END_SRC")))
    (add-hook 'org-mode-hook #'td/org-ispell)

    (use-package ob-http
      :ensure t
      :config
      (org-babel-do-load-languages
       'org-babel-load-languages
       '((emacs-lisp . t)
         (http . t))))
    (setq org-confirm-babel-evaluate nil)))

(use-package org-agenda
  :config
  (setq org-agenda-skip-deadline-if-done nil
        org-agenda-skip-scheduled-if-done nil
        org-agenda-restore-windows-after-quit t
        org-agenda-window-setup 'current-window
        org-agenda-show-all-dates t
        org-agenda-show-log t))

(use-package calc
  :defer t
  :bind ("C-c b c" . quick-calc))

(use-package magit
  :ensure t
  :defer t
  :config
  (progn
    (setq magit-display-buffer-function
          #'magit-display-buffer-fullframe-status-v1)))

(use-package dired
  :defer t
  :config
  (progn
    (dired-async-mode t)

    (setq dired-listing-switches "-alh"
          dired-recursive-copies 'always)

    (bind-keys :map dired-mode-map
               ("C-c '" . wdired-change-to-wdired-mode))))

(use-package compile
  :defer t
  :bind ("C-c m" . recompile)
  :config
  (setq compilation-scroll-output t))

(use-package ibuffer
  :defer t
