From: Eli Zaretskii <eliz@gnu.org>
To: Vincenzo Pupillo <v.pupillo@gmail.com>, Yuan Fu <casouri@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Define treesit-font-lock-level as buffer local
Date: Thu, 07 Nov 2024 13:03:49 +0200 [thread overview]
Message-ID: <861pznqp9m.fsf@gnu.org> (raw)
In-Reply-To: <4929184.OV4Wx5bFTl@3-191.divsi.unimi.it> (message from Vincenzo Pupillo on Thu, 07 Nov 2024 11:30:03 +0100)
> From: Vincenzo Pupillo <v.pupillo@gmail.com>
> Date: Thu, 07 Nov 2024 11:30:03 +0100
>
> Ciao,
> I use tree-sitter for different languages, for some of them I prefer font lock level 3, for others I prefer level 4.
> treesit-font-lock-level, however, is not defined as buffer local and so there is no elegant way to have
> different levels for different languages.
> Would it be possible to define treesit-font-lock-level as a buffer local?
Is it a problem for you to do that in your init file?
Also, we could support a value of that variable which is a list, like
we do with font-lock-maximum-decoration. This will be more useful
than making the variable buffer-local, since presumably your
preferences are per-mode, not per-buffer. Yuan, WDYT?
next prev parent reply other threads:[~2024-11-07 11:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 10:30 Define treesit-font-lock-level as buffer local Vincenzo Pupillo
2024-11-07 11:03 ` Eli Zaretskii [this message]
2024-11-07 11:08 ` Vincenzo Pupillo
2024-11-09 8:36 ` Yuan Fu
2024-11-09 8:54 ` Eli Zaretskii
2024-11-10 8:04 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=861pznqp9m.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=casouri@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=v.pupillo@gmail.com \
/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.