         :map counsel-ag-map
         "C-SPC"    #'ivy-call-and-recenter ; preview
         "C-l"      #'ivy-done
-        [C-return] #'+ivy/git-grep-other-window-action))
-
-;; Consoles
-(map!
-    :leader :prefix ("c" . "Consoles")
-    :desc "Internal (eshell)" :leader "c" #'+eshell/toggle
-    :desc "Internal (vterm)"  :leader "t" #'+vterm/toggle
-    :desc "Terminal emulator" :leader "e" #'my/open-external-term)
-
-;; Windows
-(map!
-    :leader
-    :prefix-map ("w" . "Windows")
-
-    (:prefix ("s" . "Split")
-        :desc "Horizontally" "h" #'split-window-right
-        :desc "Vertically"   "v" #'split-window-below)
-    :desc "Other window" "w" #'other-window
-    :desc "Kill window"  "x" #'ace-delete-window)
-
-;; Org mode
-(map!
-    :after org
-    :when (featurep! :lang org)
-
-    (:leader :prefix ("o" . "Org mode")
-        :desc "Agenda" "a" #'org-agenda-list)
-
-    (:mode org-mode
+        [C-return] #'+ivy/git-grep-other-window-action)
+
+    ;; Console
+    (:leader :prefix ("c" . "Consoles")
+        :desc "Internal (eshell)" :leader "c" #'+eshell/toggle
+        :desc "Internal (vterm)"  :leader "t" #'+vterm/toggle
+        :desc "Terminal emulator" :leader "e" #'my/open-external-term)
+
+    ;; Windows
+    (:leader
+        :prefix-map ("w" . "Windows")
+
+        (:prefix ("s" . "Split")
+            :desc "Horizontally" "h" #'split-window-right
+            :desc "Vertically"   "v" #'split-window-below)
+        :desc "Other window" "w" #'other-window
+        :desc "Kill window"  "x" #'ace-delete-window)
+
+    ;; Org mode
+    (:after org :when (featurep! :lang org) :mode org-mode
 
         ;; Unmap these because they interfere with window switching
         :n "M-h" nil

        :n "[["  #'git-timemachine-show-previous-revision
        :n "]]"  #'git-timemachine-show-next-revision
        :n "q"   #'git-timemachine-quit
        :n "gb"  #'git-timemachine-blame))

;; Toggles
(map!
    :leader
    :prefix ("t" . "Toggles")

    :desc "Flyspell"                     "s" #'flyspell-mode
    :desc "Flycheck list"                "f" #'flycheck-list-errors
    :desc "Line numbers"                 "l" #'doom/toggle-line-numbers
    :desc "Frame fullscreen"             "F" #'toggle-frame-fullscreen
    :desc "Indent guides"                "i" #'highlight-indentation-mode
    :desc "Indent guides (column)"       "I" #'highlight-indentation-current-column-mode
    :desc "Impatient mode"               "h" #'+impatient-mode/toggle
    :desc "Big mode"                     "b" #'doom-big-font-mode
    :desc "Evil goggles"                 "g" #'evil-goggles-mode
    :desc "Whitespace visualisation"     "w" #'whitespace-mode)

;; Make
(map!
    :leader
    :prefix ("m" . "Make")
    :desc "Execute last recipe" "m" #'+make/run-last
    :desc "Execute recipe"      "r" #'+make/run)

;; LSP
(map!
    :mode lsp-mode

    (:localleader
        :desc "Rename symbol" "r" #'lsp-rename
        :desc "Code action"   "a" #'lsp-execute-code-action
        :desc "Format buffer" "f" #'lsp-format-buffer)

    :desc "Glance documentation"  :n "gh" #'lsp-ui-doc-glance
    :desc "Go to type definition" :n "gt" #'lsp-goto-type-definition)

;; C(++)
(map!
    :mode cpp-mode
    :localleader
    :desc "Toggle header/source" "t" #'ff-find-other-file)

;; Haskell
(map!
    :mode haskell-mode
    :localleader
    :desc "Hoogle query" "h" #'haskell-hoogle)

(map!
    :map ein:notebook-mode-map
    :localleader
    "," #'+ein/hydra/body)

    :o  "s"     #'evil-surround-edit

    ;; Multiple cursors
    :v  "gi"    #'+multiple-cursors/evil-mc-make-cursor-here

    ;; Ivy
    (:after ivy
        :map ivy-minibuffer-map
        "C-SPC" #'ivy-call-and-recenter  ; preview file
