 (use-package projectile
   :ensure t
   :init
-  (progn
-    ;; Use C-\ p as prefix
-    (set 'projectile-keymap-prefix (kbd "C-\\ p")))
-
-  :config
-  (progn
-    ;; Kill C-c keys just in case
-    (define-key projectile-mode-map (kbd "C-c") nil)
-
-    ;; Use projectile to open files by default, if available.
-    (defun maybe-projectile-find-file ()
-      (interactive)
-      (if (projectile-project-p)
-	  (projectile-find-file)
-	(call-interactively #'find-file)))
-    (global-set-key (kbd "C-k") 'maybe-projectile-find-file)
-
-    ;; Use everywhere
-    (projectile-global-mode)
-
-    (set 'projectile-use-git-grep t)
-
-    (global-set-key (kbd "<f8>") #'projectile-grep)
-
-    (set 'projectile-tags-command "ctags-exuberant -eR -f \"%s\" %s")
-    ))
+  ;; Use C-\ p as prefix
+  (set 'projectile-keymap-prefix (kbd "C-\\ p"))
+
+  :config
+  ;; Kill C-c keys just in case
+  (define-key projectile-mode-map (kbd "C-c") nil)
+
+  ;; Use projectile to open files by default, if available.
+  (defun maybe-projectile-find-file ()
+    (interactive)
+    (if (projectile-project-p)
+        (projectile-find-file)
+      (call-interactively #'find-file)))
+  (global-set-key (kbd "C-k") 'maybe-projectile-find-file)
+
+  ;; Use everywhere
+  (projectile-global-mode)
+
+  (set 'projectile-use-git-grep t)
+
+  (global-set-key (kbd "<f8>") #'projectile-grep)
+
+  (set 'projectile-tags-command "ctags-exuberant -eR -f \"%s\" %s")
+  )
 
 
 

(use-package smart-mode-line
  :ensure t
  :config
  (progn
    (setq sml/no-confirm-load-theme t)

    (sml/setup)

    (sml/apply-theme 'dark)

    ;; Shorten some directories to useful stuff
    (add-to-list 'sml/replacer-regexp-list '("^~/oomph-lib/" ":OL:"))
    (add-to-list 'sml/replacer-regexp-list
                 '("^~/oomph-lib/user_drivers/micromagnetics" ":OLMM:"))
    (add-to-list 'sml/replacer-regexp-list '("^~/optoomph/" ":OPTOL:"))
    (add-to-list 'sml/replacer-regexp-list
                 '("^~/optoomph/user_drivers/micromagnetics" ":OPTOLMM:"))
    ))


;; Projectile

(add-to-list 'load-path "~/code/helm-dash")
(use-package helm-dash
  :config

  ;; base docsets
  (set 'ds/docsets '("Bash" "Emacs Lisp" "Markdown"
                     "Python 3" "SciPy" "NumPy"
                     "C" "C++"
                     "Haskell" "R"))

  ;; user contrib docsets
  (set 'ds/contrib-docsets '("SymPy" "scikit-learn"))
  ;; matplotlib seems to be broken

  ;; I generated the toolz docset myself

  (set 'python-docsets '("Python 3"
                         "NumPy" "SciPy" "SymPy"
                         "scikit-learn"
                         "toolz"
                         ))

  ;; Add: dash.el pytoolz scikit-learn

  (defun ds/installed-docsets ()
    (-map (lambda (x) (s-replace " " "_" x)) (helm-dash-installed-docsets)))

  (defun install-docsets ()
    (interactive)
    (let ((required (-filter (lambda (x) (not (-contains? (ds/installed-docsets) x))) ds/docsets)))
      (-map #'helm-dash-install-docset required)))

  (add-hook 'python-mode-hook (lambda () (setq-local helm-dash-docsets python-docsets)))
  (add-hook 'emacs-lisp-mode-hook (lambda () (setq-local helm-dash-docsets '("Emacs Lisp"))))

  )


