30.0.50; Feedback on treesit-font-lock-level

  • Open
  • quality assurance status badge
Details
4 participants
  • Augusto Stoffel
  • Yuan Fu
  • Stefan Kangas
  • Vivien Kraus
Owner
unassigned
Submitted by
Augusto Stoffel
Severity
wishlist
A
A
Augusto Stoffel wrote on 21 Oct 2023 16:16
(address . bug-gnu-emacs@gnu.org)
87il70vz6c.fsf@gmail.com
The docstring of treesit-font-lock-level says:

Level 1 usually contains only comments and definitions.

As a user of minimal fontification, I don't find this very appealing.
IMO, the lowest fontification level should allow distinguishing code
from non-code, and therefore fontify comments and strings, and nothing
else.
Y
Y
Yuan Fu wrote on 21 Oct 2023 20:18
(name . Augusto Stoffel)(address . arstoffel@gmail.com)(address . 66666@debbugs.gnu.org)
F6EBC7EB-8CDA-41F8-A070-4550BA183A77@gmail.com
Toggle quote (12 lines)
> On Oct 21, 2023, at 7:16 AM, Augusto Stoffel <arstoffel@gmail.com> wrote:
>
> The docstring of treesit-font-lock-level says:
>
> Level 1 usually contains only comments and definitions.
>
> As a user of minimal fontification, I don't find this very appealing.
> IMO, the lowest fontification level should allow distinguishing code
> from non-code, and therefore fontify comments and strings, and nothing
> else.


That’s a fair point, and I don’t have strong opinions of what minimal level of font-lock should include. The default value is derived from my observation of the (few) existing major modes that support font-lock levels.

Since this isn’t a technical issue but rather a subjective one, perhaps you can bring it up to emacs-devel and have a discussion there. If the consensus agrees with you, then we can change the default value.

If you just want to make it work for yourself, you can use treesit-font-lock-recompute-features to add/remove features you desire.

Yuan
S
S
Stefan Kangas wrote on 22 Oct 2023 21:41
control message for bug #66666
(address . control@debbugs.gnu.org)
CADwFkmkFL3scAfKYEW0fSqTtU5Rt__GFnM2u8rY7sdSQJpuG9A@mail.gmail.com
severity 66666 wishlist
quit
V
V
Vivien Kraus wrote on 22 Oct 2023 22:47
(address . 66666@debbugs.gnu.org)
b7d040cdf69c172dda1274162bcfbadb928e03a1.camel@planete-kraus.eu
severity 66666 devilish
quit
?