You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use syntax_tools to prettyprint source code, but with a slightly modified layout - for example, I'd like to have a newline after function clause arrows.
I made the layout so that it tries to be as compact as possible, so it will not break lines if there is enough room horizontally. Of course, this might not suit everyone, but it suited me at the time.
At first I thought this would be done with prettyprinter hooks, but they are only called for annotations.
Yes. In hindsight, maybe I should have added more hooks after all. Perhaps I can still change it and remain backwards compatible.
My question is: is there a way to customize the behaviour like this in a friendly way, or do I have to take the axe and hack away?
If you add annotations to the nodes you want to handle, as a prepass, you should be able to trigger the hooks and do the formatting your way.
The text was updated successfully, but these errors were encountered:
Vlad Dumitrescu wrote (08/12/2005 12:01 PM):
I made the layout so that it tries to be as compact as possible, so it will not break lines if there is enough room horizontally. Of course, this might not suit everyone, but it suited me at the time.
Yes. In hindsight, maybe I should have added more hooks after all. Perhaps I can still change it and remain backwards compatible.
If you add annotations to the nodes you want to handle, as a prepass, you should be able to trigger the hooks and do the formatting your way.
The text was updated successfully, but these errors were encountered: