[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20896: 25.0.50; [js-mode][FR] support chain syntax indentation

From: Rasmus
Subject: bug#20896: 25.0.50; [js-mode][FR] support chain syntax indentation
Date: Thu, 25 Jun 2015 17:37:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)


I would be lovely if js-mode would support the chain-syntax used by the
d3.js library.  d3.js is used to making svg graphics.  The syntax is very
readable if indentation is right:

var points = svg.selectAll(".scatter-dots")

var an_axis = axes.append("g")
Usually calls are factored out so the latter example is not so important
to be able to match.  Just aligning on the first dot on the previous line
would be a big step forward.

I don't know if this is useful for other JS libraries than d3.  Some d3
documentation mentioned this selector-mechanism was inspired by jQuery,
but I don't know this library well enough to say whether it would be
useful with that.


Not everything that goes around comes back around, you know

reply via email to

[Prev in Thread] Current Thread [Next in Thread]