You can format the selected code or the whole current file, if no selection, from the right click menu Source > Format Source