matthewkaney / text.management

Experimental Live Code Editor
GNU General Public License v3.0
46 stars 2 forks source link

Highlight on evaluation #4

Closed matthewkaney closed 2 years ago

matthewkaney commented 3 years ago

When evaluating a line of code, the editor should display a highlight decoration for the given line for a second. I attempted this in the tidal-highlights branch, but didn't get far, and Caleb mentioned that he wasn't able to get it to trigger a re-render either.

The first decoration example here seems to be exactly what I've described, so we need to figure out what's missing from there.

The question of how these decorations get removed is still pretty open. Ideally, it would be cool if they stayed around and applied some subtle styling (after a bright initial flash) to indicate evaluated lines vs non-evaluated lines. Then, they could get grayed out if they no longer have an effect (eg, after evaluating a different line of code that takes over some output or something), but that's a very speculative thing that would need a level of integration with code environments that (I believe) doesn't exist yet.