GNU bug report logs -
#75456
31.0.50; Cannot find the definition of the predicate in `treesit-thing-settings'" sexp-list)
Previous Next
Reported by: Vincenzo Pupillo <v.pupillo <at> gmail.com>
Date: Thu, 9 Jan 2025 09:51:02 UTC
Severity: normal
Found in version 31.0.50
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 75456 <at> debbugs.gnu.org (full text, mbox):
Ciao Juri,
In data giovedì 9 gennaio 2025 19:10:28 Ora standard dell’Europa centrale,
Juri Linkov ha scritto:
> > Ciao,
> > this problem occurs with js-ts-mode when jsdoc is enabled. Occurs when you
> > place the cursor in a comment highlighted by jsdoc.
> > This is the error message:
> >
> > "treesit-show-paren-data--categorize: peculiar error: ("Cannot find the
> > definition of the predicate in `treesit-thing-settings'" sexp-list)"
>
> Recently I fixed bug#75198 and tested it on your mhtml-ts-mode
> where it works nicely, and (treesit-language-at (point))
> returns e.g. 'css' on embedded css.
>
> However, now I discovered that (treesit-language-at (point))
> returns 'javascript' on embedded jsdoc parts of a js file.
>
> I wonder is this intended?
>
> Since 'treesit-node-match-p' uses node's parser, I could use
> (treesit-parser-language (treesit-node-parser (treesit-node-at (point))))
> that returns 'jsdoc'.
>
> But first I'd like to know why treesit-language-at doesn't return the same?
Local parsers, like jsdoc or phpdoc, are "ignored" by several functions used
by treesit. But I don't know in detail how treesit works.
I tried to return local parser languages in the past, but both indentation
and font-locking got messed up.
I just tried and the result is the same (maybe I did something wrong), and
then treesit-parser-list also returns jsdoc as if it were a global parser.
@Yuan can be of more help.
Thanks.
Vincenzo
This bug report was last modified 108 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.