               helm-recentf-matching t
               history-delete-duplicates t)
   (setq helm-imenu-type-faces
-        '(("^\\(f(x)\\)$" . danylo/imenu-function-face)
-          ("^\\(struct\\)$" . danylo/imenu-class-face)
-          ("^\\(@\\)$" . danylo/imenu-macro-face)
-          ("^\\(import\\|using\\|include\\)$" . danylo/imenu-import-face)
-          ("^\\(export\\)$" . danylo/imenu-export-face)
-          ("^\\(const\\)$" . danylo/imenu-const-face))
+        '(("^\\(f(x)\\)\s*$" . danylo/imenu-function-face)
+          ("^\\(struct\\|class\\)\s*$" . danylo/imenu-class-face)
+          ("^\\(@\s*\\)\s*$" . danylo/imenu-macro-face)
+          ("^\\(import\\|using\\|include\\)\s*$" . danylo/imenu-import-face)
+          ("^\\(export\\)\s*$" . danylo/imenu-export-face)
+          ("^\\(const\\)\s*$" . danylo/imenu-const-face))
         helm-imenu-delimiter " ")
   (add-hook 'helm-find-files-after-init-hook
             (lambda ()


(defun danylo/python-imenu-hooks ()
  (setq imenu-generic-expression
        '(("Function" "^[[:blank:]]*def \\(.*\\).*(.*$" 1)
          ("Class" "^class \\(.*\\).*:$" 1)))
  (setq imenu-create-index-function 'danylo/python-imenu)
  ;; Rescan the buffer as contents are added
  (setq imenu-auto-rescan t)

              :map org-mode-map
              ("C-c t i" . danylo/imenu-list-jump)
              :map imenu-list-major-mode-map
              ("C-c t i" . danylo/imenu-list-jump)
              ("DEL" . danylo/imenu-list-jump))
  :init (setq imenu-list-size danylo/side-window-width
              imenu-list-position 'left
              imenu-list-mode-line-format
