Format file with opa fmt Open a rego file in the editor and then click on Code -> Reformat with Opa Fmt menu. note: this menu is not visible if the open file is not a rego file.