Skip to main content
1 of 5
ReneFroger
  • 3.7k
  • 24
  • 67

How to change the indentation of major mode (SQL-mode)?

I use the SQL-mode. However, I have some personal preferences how the indentation should work. When I indent the following, the SQL mode indents it as following:

SELECT  foo
FROM    bar T01
WHERE   T01.foobar = 1
    AND T01.barfoo = 2

I would like to change the indentation it in the following:

SELECT  foo
FROM    bar T01
WHERE   T01.foobar = 1
AND     T01.barfoo = 2

So I decided to change the indentation myself. When looking on the source code of SQL mode, I don't see any hints where I could change the indentation for words as "AND".

Any suggestion where I could look?

ReneFroger
  • 3.7k
  • 24
  • 67