matthewkaney / text.management

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

Feature discussion: changes highlighting for unevaluated code? #42

Open cleary opened 1 year ago

cleary commented 1 year ago

So something that I find I do quite regularly is begin typing a big idea, then realise I need to change something small somewhere else, make the change, forget about my big idea that I've begun writing then wind up at some point attempting to evaluate the incomplete code changes forgetting that they are there at all.

It would actually be really nice if the editor could highlight my not-yet-evaluated changes somehow, sort of like how you can get uncommitted git changes highlights - there is a whole other discussion on how it would look (eg how to highlight a deletion, or partial deletion change) but for myself at least this could be a really killer feature :)

An (overly simplistic) neovim example with the gitgutter plugin:

image

matthewkaney commented 1 year ago

Yeah, this is a great idea, and I've been thinking along these lines as well. My ambitious vision would be to display which lines are currently "active," so that if you evaluate one d1 $ ... track in Tidal, it would clear out any others. That would be very language-specific, and require pretty deep editor integration.

In the meantime, the version you propose, focusing on new lines/evaluated lines/changed lines would be much easier to get started.