From f3bb173bdc7c9908bfb93b5a488e96028610bb91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20H=C3=B6tzel?= <juergen@hoetzel.info>
Date: Sun, 26 May 2024 19:34:57 +0200
Subject: [PATCH] Add category metadata to completing-read

---
 projectile.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/projectile.el b/projectile.el
index d89ecc45c..1587c63c5 100644
--- a/projectile.el
+++ b/projectile.el
@@ -2072,7 +2072,13 @@ project-root for every file."
                       ((bound-and-true-p ivy-mode)  'ivy)
                       (t 'default))
                    projectile-completion-system)
-            ('default (completing-read prompt choices nil nil initial-input))
+            ('default (completing-read prompt (lambda (string pred action)
+                                                (cond
+                                                 ((eq action 'metadata)
+                                                  '(metadata . ((category . file))))
+                                                 (t
+                                                  (complete-with-action action choices string pred))))
+                                       nil nil initial-input))
             ('ido (ido-completing-read prompt choices nil nil initial-input))
             ('helm
              (if (and (fboundp 'helm)