[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get decent java-script support
From: |
Dmitry Gutov |
Subject: |
Re: How to get decent java-script support |
Date: |
Thu, 25 Jun 2015 18:14:44 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 |
On 06/25/2015 06:03 PM, Rasmus wrote:
Would you mind if I open a bug on that on github? I don't know if it's a
d3 thing or something that is generally useful for JS.
If you want to open a bug, do it for js-mode, via M-x report-emacs-bug.
js2-mode intends to reuse its indentation engine.
It's can get pretty nasty so I don't know if rules can be written.
E.g.
var myvar = d3.select("#whatever")
.somefun(arg)
.call(d3.something_else(arg)
.anotherfun(arg));
You'd not actually write code like that of course (the something_else call
would be factored out to a separate var), so for the majority of code it
would be enough to just align on the first dot.
Yes, that could be non-trivial. I haven't looked into it much, though.