From: "Jostein Kjønigsen" <jostein@secure.kjonigsen.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
Yuan Fu <casouri@gmail.com>, Eli Zaretskii <eliz@gnu.org>
Cc: Dmitry Gutov <dgutov@yandex.ru>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Status update of tree-sitter features
Date: Fri, 30 Dec 2022 15:27:16 +0100 [thread overview]
Message-ID: <82501cb9-f51c-da5d-9f10-247d99012cb1@secure.kjonigsen.net> (raw)
In-Reply-To: <jwvfscyzy8y.fsf-monnier+emacs@gnu.org>
Hey everyone.
Sorry for being late to the party. As far as I can tell, there seems to
be mostly consensus on the overall picture, while some different
opinions wrt to what to actually standardize.
On 29.12.2022 04:28, Stefan Monnier wrote:
>>> If it's only about calls, maybe call this category funcall?
>> Function, property and variable are for every occurrence of them (the touted
>> “consistent highlighting”).
> In my own use, the difference between a definition and a use is more
> important than the difference between a variable name and a method name.
> I'm not fundamentally opposed to highlighting funcalls, but it is
> indispensable that funcalls get a different face from
> function definitions.
>
>
> Stefan
>
I know that some people prefer "sparse" syntax-highlighting, while
others prefer more "complete" highlighting. Personally, I value being
able to see function invocations, and love how tree-sitter makes that
easy to highlight.
As long as we have ways to accommodate both needs ("fruit salad" vs more
sparse fontification) I'm going to be happy, and we kind of already have
that through font-lock levels in the modes already.
That said, some of the tree-sitter based major modes (half? most?)
currently highlight function-invocations on level 3. If we are to make
everyone happy, we need to make changes to that, and move that to 4.
Which leads me to my main point here.
Emacs 29 release is near. We should seriously limit the amount of
changes we apply in order to fix the things we need.
Deciding at this point to rework all the features, which features we
should have, how they can be enabled/disabled, and what
enabling/disabling those should entail in practice... That's essentially
suggestion we rewrite all those tree-sitter-based major-modes.
I think a much more realistic strategy at this point is:
- to aim for what concrete things should be fontified at level 3 and 4
(default vs max). We already know 1 thing we want to change here.
- ensure the major-modes adhere to this with a minimum of changes in the
existing code.
- and most importantly: leave the discussion about adding the ability
for users to enable/disable specific features, and how that should work
in practice (overlap, presedence, etc) for Emacs 30.
Doing so would leave the new tree-sitter based major-modes pretty much
functionally on par with existing major-modes (or better, more
accurate), and it buys us a full, new release-period to figure out how
we can leverage tree-sitter to give end-users better customization
options, instead of coming up with ideas at the verge of release,
without having time to let those ideas mature.
This will end up being an API of sorts, and from my experience you don't
want to rush those.
My 2 cents.
--
Jostein
next prev parent reply other threads:[~2022-12-30 14:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-28 9:44 Status update of tree-sitter features Yuan Fu
2022-12-28 15:40 ` Mickey Petersen
2022-12-29 0:15 ` Yuan Fu
2022-12-28 23:27 ` Dmitry Gutov
2022-12-29 0:23 ` Yuan Fu
2022-12-29 0:34 ` Dmitry Gutov
2022-12-29 9:21 ` Yuan Fu
2022-12-29 16:38 ` Dmitry Gutov
2022-12-30 11:16 ` Yuan Fu
2022-12-30 23:41 ` Dmitry Gutov
2022-12-31 22:15 ` Yuan Fu
2022-12-29 3:28 ` Stefan Monnier
2022-12-29 9:23 ` Yuan Fu
2022-12-30 14:27 ` Jostein Kjønigsen [this message]
2022-12-30 15:37 ` Eli Zaretskii
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=82501cb9-f51c-da5d-9f10-247d99012cb1@secure.kjonigsen.net \
--to=jostein@secure.kjonigsen.net \
--cc=casouri@gmail.com \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jostein@kjonigsen.net \
--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).