cessen / ropey

A utf8 text rope for manipulating and editing large texts.
MIT License
1.04k stars 46 forks source link

Add possibility to add "metadata" to slices of text #13

Closed njskalski closed 6 years ago

njskalski commented 6 years ago

Hi,

I like ropey very much, but I have one issue I do not know how to walk around. I need to add syntax highlighting and I do not want to recompute it lazily. So I need to attach short information to ranges (this example: exclusive ranges) of text. Depending on context, I would like to have a choice to see if I am breaking a piece of color (keyword) or keeping it (comment). In some cases I could avoid recalculating highlighting altogether.

What do you think?

njskalski commented 6 years ago

Just occurred to me that these do not have to belong to same data structure. I think I can write something out myself.