How to configure emacs so that it indents code within ~H sigil quotes properly?

Just that.
My current emacs config messes up the indentation for the colocated template code living in .ex files.
Has anyone here figured it out yet?

Thanks.