justinpombrio / partial-pretty-printer

A pretty printing library for formatting source code in any language, which can efficiently print just part of a document.
Apache License 2.0
3 stars 0 forks source link

Fancy non-whitespace indentation #15

Closed e-matteson closed 8 months ago

e-matteson commented 8 months ago

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.

justinpombrio commented 8 months ago

Reviewed. See the changes I pushed. And three suggestions:

Each of these suggestions has a TODO, that should be deleted when it's done or wontfix-ed.