[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Initial fontification in sh-mode with tree-sittter

From: Yuan Fu
Subject: Re: Initial fontification in sh-mode with tree-sittter
Date: Tue, 1 Nov 2022 01:37:58 -0700

> On Oct 31, 2022, at 8:38 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> You probably don’t need to set enabled features, because you can set
>> maximum-decoration to a high value and specify what to disable.
>> And maximum-decoration is infinity by default.
> I thought it would be nice to let people choose an approximate baseline
> by setting their "decoration level" and then tweak things by *either*
> adding or removing elements from it.
> E.g. I generally like my fontification to be quite subdued so I'd like
> choose a low baseline decoration level, but I might want to add one or
> two things to it in some modes.

Done. I reused treesit-font-lock-recompute-features:

(add-hook 'xxx-mode-hook
          (lambda ()
             ‘(features-to-add...) '(features-to-remove...))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]