pedro-w / vscode-tmlanguage

Syntax highlighting for TextMate/SublimeText language definitions
MIT License
18 stars 4 forks source link

Does not report trailing commas as JSON errors #10

Open shdwcat opened 1 year ago

shdwcat commented 1 year ago

For example, this chunk of JSON is not valid:

    "patterns": [
        {
            "include": "#keywords"
        },
        {
            "include": "#strings"
        }, <-- this comma is an error in standard JSON
    ],

It's very easy to miss these and VS Code will not load the language file if errors like this are present.

pedro-w commented 1 year ago

Apologies for the delay, I will look into it.

pedro-w commented 1 year ago

Actually I don't know how to do this. I put a bounty on an unanswered question on StackOverflow - it didn't help much but it looks like maybe I have to add a JSON parser as a dependency and make use of that. Which seems weird that I can't make use of the JSON support that VSCode already has built-in. In other words I just want the tmlanguage to be an add-in to JSON editing, not replace it entirely.