I prefer to use yaml for most of automations and scripts.
I split them up with !include_dir_merge_list (Splitting up the configuration - Home Assistant) in a folder.
Sometime I forget in which file i put a specific automation or script. I would be nice to see in which file a specific config is placed.
After facing the same issue I started copying the file path into the description.
I use integrated Studio Code Server and there it is easy to search over all files
I know the pain, because of that im migrating all my automations to the UI (although i greatly preferred doing all the yamls in packages)