   "Displays the buffer's full path relative to the project root (includes the
 project root). Excludes the file basename. See `doom-buffer-name' for that."
   (if buffer-file-name
-    (let* ((default-directory (f-dirname buffer-file-name))
-           (buffer-path (f-relative buffer-file-name (doom-project-root)))
+    (let* ((default-directory (file-name-directory buffer-file-name))
+           (buffer-path (file-relative-name buffer-file-name (doom-project-root)))
            (max-length (truncate (* (window-body-width) 0.4))))
       (when (and buffer-path (not (equal buffer-path ".")))
         (if (> (length buffer-path) max-length)


(@def-modeline-segment matches
  "TODO"
  (or (concat (if (active) (+doom-modeline--macro-recording))
              (when (featurep 'evil)
                (concat (+doom-modeline--anzu)
                        (+doom-modeline--evil-substitute)))
              (if (boundp 'iedit-mode) (+doom-modeline--iedit))
              )
      " %I "))

(@def-modeline-segment media-info

(make-variable-buffer-local 'anzu--state)
(defsubst +doom-modeline--anzu ()
  "Show the match index and total number thereof. Requires `evil-anzu'."
  (when (and (bound-and-true-p anzu--current-position)
             (evil-ex-hl-active-p 'evil-ex-search))
    (propertize
     (format " %s/%d%s "
             anzu--current-position anzu--total-matched
