takikawa / sweet-racket

A port of sweet expressions to Racket
http://pkg-build.racket-lang.org/doc/sweet/index.html
Other
47 stars 10 forks source link

make an indenter that doesn't un-indent sweet expressions #33

Closed AlexKnauth closed 9 years ago

AlexKnauth commented 9 years ago

this makes sure that hitting tab or indent doesn’t un-indent a properly indented form

AlexKnauth commented 9 years ago

@takikawa @jackfirth Does this look good to merge?

takikawa commented 9 years ago

Maybe document the top of the new module to say it's an indenter that doesn't do anything? Otherwise LGTM.

AlexKnauth commented 9 years ago

It actually does do a few things now. It uses normal s-exp indentation rules when it's within an s-expression but not on the first line of an s-expression, and otherwise it can still do something if it's given a blank line, so that it makes the indentation of the blank line equal to the indentation of the next line, which is useful for adding items to the middle a form (but not onto the end).

AlexKnauth commented 9 years ago

That's because DrRacket automatically does the indent feature for a new blank line whenever you hit return.