unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: Martin Vath <martin@mvath.de>,
	Mauro Aranda <maurooaranda@gmail.com>,
	26217@debbugs.gnu.org
Subject: bug#26217: bug#2910: 23.0.60; Shell-script coloring bug
Date: Sat, 14 Oct 2023 15:07:01 -0400	[thread overview]
Message-ID: <jwv8r85jata.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <d8431ee7-32a8-9876-a39d-29d3f53819eb@gutov.dev> (Dmitry Gutov's message of "Sat, 14 Oct 2023 19:43:00 +0300")

>> FWIW, it's not clear at all what such a layer would look like, so we're
>> pretty far from it.  I'd welcome people start thinking about it, maybe
>> by looking at existing alternatives like our own `wisi` (in GNU ELPA),
>> SMIE, maybe LSP (assuming there are servers out there which can provide
>> that kind of functionality), etc...
> I don't know how feasible that would be,

That's the wrong way to look at it.  There is no doubt that it
is feasible.  What is under question is what it would take.

> given that the ts major modes we write have to reference fairly low
> level concerns (such as node names, different across all grammars).

That just means that a given set of highlighting/indentation rules would
not necessarily work with all possible parser-backends.  But maybe we
could bridge the gap by allowing some intermediate layer that could do
things like translate node names (could be useful even within the
tree-sitter context to deal with evolving grammars).

I'm not saying this is the way to go, mind you.  I don't know how it
could/should work.

But I do think we could do worse than start thinking about it, because
tree-sitter is the kind of technology that's on the "treadmill", whereas
Emacs' evolution has a different pace: how well will Emacs-29's TS modes
work with 2028's tree-sitter grammars?

> Maybe porting Lezer (https://lezer.codemirror.net/) could become

Interesting, thanks.

> a replacement in such a scenario, but then we're back to maintaining
> our own grammars again, and with lower performance by an order of
> a magnitude.

We could look into Lezer support just to help us guide the design of an
intermediate layer API.  No need to maintain lots of our own grammars or
take the performance impact :-)


        Stefan






  reply	other threads:[~2023-10-14 19:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22  9:10 bug#26217: 25.2; shell syntax does not know for i do Martin Vath
2023-10-13 12:07 ` bug#26217: bug#2910: 23.0.60; Shell-script coloring bug Mauro Aranda
2023-10-13 16:06   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 12:44     ` Mauro Aranda
2023-10-14 14:58       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 15:01         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 16:43     ` Dmitry Gutov
2023-10-14 19:07       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-10-14 19:49         ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwv8r85jata.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=26217@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=martin@mvath.de \
    --cc=maurooaranda@gmail.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 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).