You might be interested in Dion[1], which is the most impressive demonstration of such a feature that I have seen so far. However, it does not appear to be in active development any longer.
"Our ultimate goal is to build a better way to develop software. Last year we developed a prototype of some of our ideas and presented it at Handmade Seattle 2020. Some of the results were exciting, but now we think we shouldn't start by building a single integrated tool. Our new priority is the design of a new file format for source code. It's still a challenging task, but it's well scoped and achievable. Here we explain our roadmap for the development of this new format.
...
"Our goal is to build a format that compares to text files in the way that text files compare to bitmaps."
[1]: https://dion.systems/gallery.html