                  (file-name-directory buffer-file-name)
                ".")))
     (find-dired dir "'(' -name .svn -o -name .git ')' -prune -o -type f")))
-(bind-key "C-c s f" 'ar/find-all-dired-current-dir)
 
 ;; Quickly undo pop-ups or other window configurations.
 (use-package winner

  "Search current repo/project using ag."
  (interactive)
  (helm-do-ag (projectile-project-root)))

;; Use ag for grepping git project.
(bind-key "C-c s r" 'ar/projectile-helm-ag)
;; Use ag for grepping from current location.
(bind-key "C-c s d" 'helm-do-ag)

(use-package helm-dash
  :ensure t

(use-package flycheck-pos-tip
  :ensure t)

(use-package hydra
  :ensure t)
(setq hydra-is-helpful t)

(global-set-key
 (kbd "C-c s")
 (defhydra hydra-toggle (:color blue)
   "search"
   ;; Use ag for grepping from current location.
   ("d" helm-do-ag "directory")
   ;; Use ag for grepping git project.
   ("r" ar/projectile-helm-ag "repository")
   ;; Find all files from current location.
   ("f" ar/find-all-dired-current-dir "find all")
   ("q" nil "cancel")))

;; Override default flycheck triggers
(setq flycheck-check-syntax-automatically
      '(save idle-change mode-enabled)
