Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

JSON syntax highlighting brokenΒ #88

@phenotypic

Description

@phenotypic

Hi there, I'm using Atom 1.57.0 and JSON syntax highlighting has been broken for quite a while.

Issues relating to this problem have been opened in the language-json repo multiple times (here, here, here), but closed every time without resolution. I opened another issue almost a week ago in the same repo, but it has been ignored.

To illustrate the problem, this is what my JSON files look like when I check "Use Tree Sitter Parsers" in settings:

82782310-07820d00-9e2a-11ea-8458-46fc31f5bb0c

As you can see, the JSON syntax highlighting is broken. Only when I disable Tree Sitter does the highlighting work as expected:

82782677-e4a42880-9e2a-11ea-86e2-810a324ad241

This is clearly quite a major issue, because it is undesirable to keep Tree Sitters disabled as this breaks syntax highlighting in other languages like JavaScript and Python. It's strange that such a major issue has gone unresolved for 2 years!

It seems this comment by @Arcanemagus explains what the issue is. By the sounds of it, tree-sitter-json is providing a correct syntax tree for the JSON, but something has changed with the way JSON is styled by Atom's themes, or the way the syntax tree is being interpreted by Atom's JSON grammar.

What can be done to get the issue fixed to make sure JSON files are highlighted correctly in Atom?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions