unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20896: 25.0.50; [js-mode][FR] support chain syntax indentation
@ 2015-06-25 15:37 Rasmus
  2015-06-26  0:14 ` Rasmus
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Rasmus @ 2015-06-25 15:37 UTC (permalink / raw)
  To: 20896

Hi,

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")
               .data(data)
               .enter().append("path")
               .more_funs();
               

var an_axis = axes.append("g")
                  .call(d3.svg.axis()
                          .scale(Scale)
                          .orient("bottom"));
   
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.

Thanks,
Rasmus

-- 
Not everything that goes around comes back around, you know





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-01-14 17:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25 15:37 bug#20896: 25.0.50; [js-mode][FR] support chain syntax indentation Rasmus
2015-06-26  0:14 ` Rasmus
2017-01-10  6:29 ` bug#20896: patch to add chained indentation Tom Tromey
2017-01-12  1:57   ` Dmitry Gutov
2017-01-12  4:01     ` Tom Tromey
2017-01-13  1:09       ` Dmitry Gutov
2017-01-14 17:45 ` bug#20896: done Tom Tromey

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).