
On Sat, Dec 17, 2022, 1:03 PM <emil@emilstenstrom.se> wrote:
Moreover, there is no reason an editor could not have a capability to "colorize any string passed to a function named foo()." Perhaps with some sort of configuration file that indicates which function names correspond to which languages, but also with presets.
This is an interesting idea. Some counter-arguments: * Anything that's hidden behind a config file won't be used except by very few. So, as you say, you need presets somehow.
I've been using vim long enough that I probably only edit .vimrc (or correspondingly for neovim) every week or two. I use VS Code much less, so when I do, I probably edit setting.json more like once a day (when I'm using it) But many editors in any cases, have friendly custom editors for some elements of their configs. Of course, if presets are fine, indeed users need not change them. Tagged templates do EXACTLY ZERO to make this less of a concern. If there was a chance this could happen, it would solve my problem nicely.
For the reasons above, I don't think this will be acceptable to editors.
I could trivially implement this in a few lines within every modern editor I am aware of. I bet you can do it for your editor with less than 2 hours effort.