SQL Formatting in RStudio

Does anyone know how to auto-formatting SQL codes in RStudio IDE?

Try saving the file as .sql, then R Studio will recognize it as sql.

1 Like

@valeri , very appreciate your suggestion. I know RStudio can highlight the SQL code, however, what I am seeking is auto formatting instead of the only code highlight.