Open ko-ya346 opened 7 months ago
Thanks for the suggestion.
The indentation of the FROM
-clause has probably the most variations in the already pretty tricky world of SQL code indentation.
FROM
or one level deeper?ON
placed on a separate line?ON
indented the same amount as the join or deeper?ON
?It's hard to please everyone. I would need to add several configuration options to cover all the possible styles.
Also, I'm not really doing active feature development on SQL Formatter any more. Instead concentrating on prettier-plugin-sql-cst. But that one also doesn't indent the FROM clause the way you would like and the goal of it is really to be pretty opinionated in its formatting style.
Thank you for your reply. I understand that my proposal may not be easily implemented. I will consider what additional settings might make these variations possible.
I was not aware of prettier-plugin-sql-cst. Thank you for the information. I plan to try it out and see what it can do.
I would like to propose a feature that allows users to configure the indentation for SQL JOIN clauses through an option. This feature would enable more flexibility in formatting SQL queries to match different coding styles and preferences.
Specifically, I'm looking for the ability to format JOIN clauses like the following example:
This formatting style increases readability by clearly separating each part of the JOIN clause with consistent indentation. It would be great to have an option in the SQL Formatter that allows us to achieve this level of clarity in our SQL code.
Thank you for considering this feature request.