unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: 60983@debbugs.gnu.org, theo@thornhill.no
Subject: bug#60983: 29.0.60; Tree-sitter user-level control
Date: Sun, 05 Feb 2023 11:23:31 +0200	[thread overview]
Message-ID: <83ilggsbxo.fsf@gnu.org> (raw)
In-Reply-To: <1CC382C7-8663-4F12-9163-916EE1FFCFBB@gmail.com> (message from Yuan Fu on Sat, 4 Feb 2023 23:54:56 -0800)

> From: Yuan Fu <casouri@gmail.com>
> Date: Sat, 4 Feb 2023 23:54:56 -0800
> Cc: Bug Report Emacs <bug-gnu-emacs@gnu.org>,
>  theo@thornhill.no
> 
> > Yes, that's how I understood what you were saying: changing the list
> > of features enabled/disabled by specific levels.  This is not a
> > user-level thing, so describing it in the ELisp manual is good enough,
> > I think.  (If it turns out users want to do this kind of thing too
> > often, it probably means our design of the user-facing features is
> > sub-optimal and should be improved.)
> 
> I see, my description and the documentation is still not clear enough, I’m afraid. treesit-font-lock-recompute-feature does not add/remove features that belongs to a level. The design is that, the user uses decoration level to set the rough level, which enables a set of features, then use treesit-font-lock-recompute-feature to do more fine-grained control by additionally enabling/disabling features. 
> 
> For example in c-ts-mode, if I set the decoration level to 2, I’d have these features: comment, definition, keyword, preprocessor, string, type. If I also want the assignment features, which is in level 3, but don’t want other features in level 3, I would use treesit-font-lock-recompute-feature to enable that feature. Similarly, I can use treesit-font-lock-recompute-feature to disable the preprocessor which is at level 2, without affecting other features status.

That's exactly what I understood, and that was what I responded to.  I
don't think it's a user-level feature to tweak the list of features
that are enabled/disables by a certain decoration level.  It is on the
level of Lisp programming, and therefore should be described in the
ELisp manual.





  reply	other threads:[~2023-02-05  9:23 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21 11:11 bug#60983: 29.0.60; Tree-sitter user-level control Eli Zaretskii
2023-01-21 11:48 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-21 12:36   ` Eli Zaretskii
2023-01-21 12:40     ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-23 19:37       ` Yuan Fu
2023-01-23 19:59         ` Eli Zaretskii
2023-01-23 21:08           ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-23 23:55             ` Yuan Fu
2023-01-29 13:33               ` Eli Zaretskii
2023-01-29 19:12                 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-29 19:41                   ` Eli Zaretskii
2023-01-30  2:28                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-30 13:45                       ` Eli Zaretskii
2023-01-24  3:26             ` Eli Zaretskii
2023-01-25 20:12               ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-25 21:16                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-26  8:27                   ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-26  6:08                 ` Eli Zaretskii
2023-01-26  6:25                   ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-23 16:52   ` Eli Zaretskii
2023-01-26  7:27     ` Eli Zaretskii
2023-01-26  7:37       ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-26  9:08         ` Eli Zaretskii
2023-01-28 13:12       ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-28 13:25         ` Eli Zaretskii
2023-01-28 18:41           ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-29 13:24             ` Eli Zaretskii
2023-01-26  7:56 ` Yuan Fu
2023-02-03  3:07 ` Yuan Fu
2023-02-03  7:47   ` Eli Zaretskii
2023-02-04 23:38     ` Yuan Fu
2023-02-05  6:01       ` Eli Zaretskii
2023-02-05  7:54         ` Yuan Fu
2023-02-05  9:23           ` Eli Zaretskii [this message]
2023-02-05  9:42             ` Yuan Fu

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=83ilggsbxo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=60983@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=theo@thornhill.no \
    /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).