From: Eli Zaretskii <eliz@gnu.org>
To: Mickey Petersen <mickey@masteringemacs.org>
Cc: 61043@debbugs.gnu.org, dgutov@yandex.ru
Subject: bug#61043: 30.0.50; `json-ts-mode': invalid font lock rule
Date: Wed, 25 Jan 2023 15:00:16 +0200 [thread overview]
Message-ID: <83v8kug467.fsf@gnu.org> (raw)
In-Reply-To: <87cz73vzpi.fsf@masteringemacs.org> (message from Mickey Petersen on Wed, 25 Jan 2023 07:29:23 +0000)
> Cc: 61043@debbugs.gnu.org
> From: Mickey Petersen <mickey@masteringemacs.org>
> Date: Wed, 25 Jan 2023 07:29:23 +0000
>
>
> Dmitry Gutov <dgutov@yandex.ru> writes:
>
> > On 24/01/2023 22:09, Mickey Petersen wrote:
> >> There's a comment font lock rule in `json-ts-mode'. However, that is
> >> illegal and againt the JSON spec, and indeed the search query fails
> >> because `comment' is not a valid node type.
> >
> > When you say it fails, how does that look to you?
> >
> > Here's an example of a JSON file (or, more accurately, a JSON-superset
> > file) with comments:
> > https://raw.githubusercontent.com/huytd/vscode-espresso-tutti/master/themes/Espresso%20Tutti-color-theme.json
> >
> > The JSON tree-sitter grammar seems to parse them correctly as comments
> > ("comment" node type), and json-ts-mode highlights them as comments
> > correctly as a result.
>
> It may well be my JSON grammar file that is different then. Which is
> perhaps even worse: it is easy to find yourself with one of two
> versions.
For best results, always use the latest from their Git repository.
Many of the grammar libraries are updated every few days, so they are
not stable enough to rely on outdated versions. Unfortunately,
there's no "grammar version" API in the tree-sitter-to-grammar
protocol, so we cannot even implement version checking, and refuse to
use outdated (and thus buggy) grammar libraries. Moreover, many
grammar libraries don't even make releases and thus don't announce
their version.
prev parent reply other threads:[~2023-01-25 13:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-24 20:09 bug#61043: 30.0.50; `json-ts-mode': invalid font lock rule Mickey Petersen
2023-01-24 21:08 ` Drew Adams
2023-01-24 21:10 ` Drew Adams
2023-01-25 7:27 ` Mickey Petersen
2023-01-25 1:28 ` Dmitry Gutov
2023-01-25 7:29 ` Mickey Petersen
2023-01-25 12:08 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-25 12:09 ` Mickey Petersen
2023-01-25 13:14 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-25 13:30 ` Dmitry Gutov
2023-01-25 13:00 ` Eli Zaretskii [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83v8kug467.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=61043@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=mickey@masteringemacs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).