From: Steinar Bang <sb@dod.no>
To: help-gnu-emacs@gnu.org
Subject: Re: JavaScript/TypeScript: What do people in 2024, on emacs 29, use for .js, .jsx, .ts and .tsx?
Date: Wed, 10 Jan 2024 17:21:02 +0100 [thread overview]
Message-ID: <87v8816txt.fsf@dod.no> (raw)
In-Reply-To: <77493010-0b8f-4173-88ed-e726b89a3fad@gutov.dev> (Dmitry Gutov's message of "Tue, 9 Jan 2024 19:32:31 +0200")
>>>>> Dmitry Gutov <dmitry@gutov.dev>:
> js-mode handles JSX indeed, but it's inevitaby limited in what it
> understands about its syntax (it uses sgml-mode under the covers to do
> highlighting, but I'm sure there would be odd edge cases).
Ah, ok. Thanks for the update!
> The latest new option in 29.1 is js-ts-mode (which uses tree-sitter
> parser and supports JSX too). It should provide the most accurate
> highlighting and reliable indentation,
Hm... interesting! I ran into the tree-sitter thing, yesterday, while
looking for documentation for the the js-mode of emacs 29.
> but some features (like tag splitting?) might have to be reimplemented
> anew. Should be easier to do that using tree-sitter parse tree than
> with sgml-mode. Perhaps if rjsx-mode has an implementation, it
> wouldn't be too hard to port it.
I'll do a dive into the rjsx code and see if I can identify where it
does tag splitting and post back on the thread here.
next prev parent reply other threads:[~2024-01-10 16:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 12:12 JavaScript/TypeScript: What do people in 2024, on emacs 29, use for .js, .jsx, .ts and .tsx? Steinar Bang
2024-01-09 17:32 ` Dmitry Gutov
2024-01-10 16:21 ` Steinar Bang [this message]
2024-01-13 7:30 ` Steinar Bang
2024-01-14 21:00 ` Dmitry Gutov
2024-01-22 13:54 ` Steinar Bang
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=87v8816txt.fsf@dod.no \
--to=sb@dod.no \
--cc=help-gnu-emacs@gnu.org \
/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.