I have code that solves this for me, but I think this could be a feature that would be really handy to have in portal itself, as it allows for simple customization, without the hassle of adding metadata to everything.
I would like feedback before I decide if this is something I even could contribute on my own. 🙂
@MrEbbinghaus Gotcha, I think this is mostly already supported in Portal via :portal.viewer/for {} in metadata. For example, here is how it's used for portal.nrepl.
It would be great to be able to assign default viewers to values of associative structures like maps, without using metadata, which often is a pain.
Example: I use µlog for logging and tracing, a log value may look like this:
It would be great if you could add a key → viewer config to portal, that declares the default viewer for the value of a key.
I have code that solves this for me, but I think this could be a feature that would be really handy to have in portal itself, as it allows for simple customization, without the hassle of adding metadata to everything.
I would like feedback before I decide if this is something I even could contribute on my own. 🙂