all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Jackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Comprehensive JSX support in Emacs
Date: Sun, 7 Apr 2019 03:31:40 +0300	[thread overview]
Message-ID: <8a07f46e-efe3-ba3b-beb1-db6434aa1c20@yandex.ru> (raw)
In-Reply-To: <58f55351-67b9-a016-1a00-829c11395ffe@jacksonrayhamilton.com>

On 06.04.2019 18:55, Jackson Ray Hamilton wrote:

>> It's probably still worth it to get the feature into master soon.
> I agree.  I’ll see if I can tackle the performance issue first, then 
> I’ll rebase/merge the branch into master.

It might be worth it to merge even if the issue turns out to be too 
difficult to deal with right away, though.

>> Do you have commit access?
> I’m not sure.  If not, will someone please grant it to me?

You'll need to register at https://savannah.gnu.org/, find the 'emacs' 
group and request access there (there's a button).

>> The colors are very nice to have. Do you think this approach is 
>> portable to js2-mode?
> Possibly…  js-mode is using font-lock keywords to add the colors, but 
> js2-mode apparently isn’t.  js2-mode would need to pay attention to the 
> js-jsx-* text properties like in js-jsx--font-lock-keywords and apply 
> colors like in the associated matcher functions (js-jsx--match-tag-name, 
> js-jsx--match-attribute-name, et al).

*shrug*, font-lock-keywords also usually work there (e.g. when added 
from a hook or a minor mode), so maybe the easiest approach would work too.

> Until someone steps up to add proper JSX parsing to the JS2 AST… perhaps 
> a fusion of the keywords-style and AST-style colorings could provide JSX 
> and JS coloring (respectively) in JS2.

Yup.

> I’ll check for that.  I’m also planning on analyzing the results of 
> elp-instrument-package and doing some step-debugging to deduce where and 
> why it’s lagging.
> 
> I’ve already found that it’s lagging when I’m editing a large chunk of 
> JSX code or the code before it.  However, if I edit code in the buffer 
> following the chunk of JSX, then the lag noticeably drops.  You can see 
> this by opening the attached “Slow JSX.jsx” file and editing it.  This 
> might be related to how I extended syntax propertization and 
> font-locking to the boundaries of a root enclosing JSXElement; if a root 
> is hundreds of lines long, there could be negative consequences.  Maybe 
> we can be more conservative with the parsing/coloring, somehow.

I'll leave that investigation to you and Stefan, for now at least.

Thanks for working on it.



  reply	other threads:[~2019-04-07  0:31 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14  5:06 Comprehensive JSX support in Emacs Jackson Ray Hamilton
2019-02-14  8:03 ` Marcin Borkowski
2019-02-14 14:10 ` Stefan Monnier
2019-02-14 15:04   ` Clément Pit-Claudel
2019-02-15  8:21   ` Jackson Ray Hamilton
2019-02-15 13:25     ` Stefan Monnier
2019-02-15 13:54     ` Dmitry Gutov
2019-02-15 14:39 ` Dmitry Gutov
2019-02-16 20:50 ` Jostein Kjønigsen
2019-02-18  7:17   ` Jackson Ray Hamilton
2019-03-27  8:03 ` Jackson Ray Hamilton
2019-03-27  9:36   ` Marcin Borkowski
2019-03-30  2:18     ` Jackson Ray Hamilton
2019-04-02  1:12       ` Dmitry Gutov
2019-04-06 16:09         ` Jackson Ray Hamilton
2019-03-30  2:08   ` Jackson Ray Hamilton
2019-04-02  1:07   ` Dmitry Gutov
2019-04-02 11:23     ` Stefan Monnier
2019-04-06 16:02       ` Jackson Ray Hamilton
2019-04-07 23:19         ` Jackson Ray Hamilton
2019-04-09  6:06       ` Jackson Ray Hamilton
2019-04-09  8:12         ` Eli Zaretskii
2019-04-10  1:56           ` Jackson Ray Hamilton
2019-04-10 15:43             ` Eli Zaretskii
2019-04-06 15:55     ` Jackson Ray Hamilton
2019-04-07  0:31       ` Dmitry Gutov [this message]
2019-04-09  6:16         ` Jackson Ray Hamilton
2019-04-09  7:10           ` Marcin Borkowski
2019-04-09  8:00             ` Jackson Ray Hamilton
2019-04-11 19:51               ` Marcin Borkowski
2019-10-20 16:57                 ` Steinar Bang
  -- strict thread matches above, loose matches on Subject: below --
2019-02-15  6:38 Jackson Ray Hamilton
2019-02-17  6:10 ` Marcin Borkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a07f46e-efe3-ba3b-beb1-db6434aa1c20@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=jackson@jacksonrayhamilton.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.