jcsalomon / smarttabs

Emacs smart tabs - indent with tabs, align with spaces!
http://www.emacswiki.org/emacs/SmartTabs
114 stars 20 forks source link

JavaScript: line continuations starting with `.` aren't lined up properly #42

Open strugee opened 8 years ago

strugee commented 8 years ago

Given the following unindented code:

function foo() {
readableStream.pipe(throughStream)
.pipe(writableStream);
}

the correct indentation with smart-tabs-mode enabled is:

function foo() {
<tab>readableStream.pipe(throughStream)
<tab>              .pipe(writableStream);
}

i.e. the .s should line up. (This pattern is quite common in Node programs.)

However, smart-tabs-mode indents this as:

function foo() {
<tab>readableStream.pipe(throughStream)
<tab><tab>.pipe(writableStream);
}

Which is obviously incorrect.