[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Clarification about treesit-font-lock-settings
From: |
vp |
Subject: |
Re: Clarification about treesit-font-lock-settings |
Date: |
Mon, 27 Feb 2023 12:06:19 +0100 |
Thank you Yuan!
Vincenzo
In data domenica 26 febbraio 2023 10:15:41 CET, Yuan Fu ha scritto:
>
> > On Feb 25, 2023, at 2:18 PM, Vincenzo Pupillo <v.pupillo@gmail.com> wrote:
> >
> > Okay, I figured out how to do it:
> > :language 'php
> > :feature 'attribute
> > '((((attribute (_) @attribute_name) @font-lock-preprocessor-face)
> > (:match "Deprecated" @attribute_name)))
> >
> > However, I cannot understand why "treesit-query-validate" says the query is
> > correct, but I get an error.
> >
> > Thank you.
> > Vincenzo
>
> Sorry that I missed your message! treesit-query-validate simply compiles the
> query and rely on tree-sitter to report any potential error. But predicates
> like #match and #equal are delegated to Emacs to handle, so tree-sitter
> doesn’t check for their arity and there is no error during compilation. Also,
> the error message should say “#match” instead of “#equal”, I fixed that typo.
>
> Yuan
>