A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg00014.html below:

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] 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 ()
            (treesit-font-lock-recompute-features
             ‘(features-to-add...) '(features-to-remove...))))

Yuan


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4