Closed e-matteson closed 8 months ago
Reviewed. See the changes I pushed. And three suggestions:
append
method isn't needed. It can just have append_text
and append_newline
, and they'll both be much simpler.struct Line { segments: Vec<Segment> }
should probably just be struct Line(Vec<Segment>)
?Block::new()
should take an &IndentNode
for effiency. Maybe? Though it isn't cloning, maybe it's already walking the Rcs without modifying their counts?Each of these suggestions has a TODO, that should be deleted when it's done or wontfix-ed.
Now indentation can be an arbitrary string instead of just a number of spaces. This will allow comment nodes to place comment syntax in front of all of the lines they contain. We also now store doc node ids and marks for each individual level of indentation, which will allow for better cursor region highlighting.