 ;; Twitter.
 (use-package twittering-mode :ensure t)
 
-(use-package rainbow-delimiters :ensure t)
+(use-package rainbow-delimiters :ensure t
+  :hook (prog-mode . rainbow-delimiters-mode))
 
 (use-package hungry-delete :ensure t
   :config (global-hungry-delete-mode))

  ;; #slow
  ;; (turn-on-fci-mode)
  ;; (ar/company-fci-workaround)
  (yas-minor-mode +1))

(defun ar/markdown-mode-hook-function ()
  "Called when entering `markdown-mode'."

  :bind ("C-c w" . er/expand-region))

;; Visual feedback for query-replace, replace, and multiple cursors.
(use-package visual-regexp :ensure t
  :commands (vr/mc-mark vr/query-replace vr/replace))

(use-package yasnippet :ensure t
  :hook ((org-mode . yas-minor-mode)
         (prog-mode . yas-minor-mode))
  :config
  (use-package yasnippet-snippets :ensure t)
  (validate-setq yas-indent-line 'fixed)
  (validate-setq yas-snippet-dirs
                 '("~/.emacs.d/yasnippets/personal"
                   "~/.emacs.d/yasnippets/yasnippet-snippets"))
  (yas-reload-all)
  (use-package ivy :ensure t)

  ;; Display's yasnippet previous inline when cycling through results.
  (use-package ivy-yasnippet :ensure t)

  ;; Use aya-create and aya-expand to
  ;; Create a throw-away yasnippet for say:
  ;; This is the ~rhythm of the ~night
  (use-package auto-yasnippet :ensure t))

;; Back to helm-swoop for now.
;; (use-package swiper :ensure t)
