Datagrip SQL Code Formatting: JOIN / ON / AND Indention
I would like the `and` in the join below to indent in alignment with `on`, but cannot locate the appropriate setting. Any suggestions?
Expected
left join b
on b.id = a.id
and b.line_id = a.line_id
Actual
left join b
on b.id = a.id
and b.line_id = a.line_id
Please sign in to leave a comment.
You need to play around with the following setting in File | Settings | Editor | Code Style | SQL | General:
I already have that set to `JOIN continuously indented`. The `on` is indented correctly, but the `and` is not.
If I change to `JOIN indented`, as you have, the `on` is no longer indented. It looks like the following.
Settings:
There is no option to indent the AND clause I'm afraid, but you can achieve the desired result using the following settings: