Last I knew, there’s not a handlebars AST printer that does a good job of preserving formatting. That is the main blocker to writing HBS code mods.
(People modify handlebars AST often, but it’s usually as a transform that runs at build time, so that the code it emits goes straight into the template compiler, not back out into your repo.)