What is wrong with this code for visual studio code highlighting?

119 views Asked by At

I'm new in visual studio code language creation, and I tried to make my own syntax highlighting for my custom language using yo code. In my tmLanguge.json file, I got this code, but I don't work and it doesn't highlight anything at all. Can someone please tell me what the problem is?

When I tried it only with the "comments" object, it worked well...

Thanks

{
    "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
    "name": "OP-RANDS++",
    "patterns": [
        {
            "include": "#comments"
        },
        {
            "include": "#numbers"
        },
        {
            "include": "#blocks"
        },
        {
            "include": "#basecalls"
        },
        {
            "include": "#outin"
        },
        {
            "include": "#defines"
        },
        {
            "include": "#maths"
        },
        {
            "include": "#others"
        }
    ],
    "repository": {
        "comments": {
            "patterns": [
                {
                    "name":"comment",
                    "match": "^\u005c?.*"
                }
            ]
        },
        "numbers": {
            "patterns": [
                {
                    "name": "constant.numeric",
                    "match": "\u005cd|\u005c\u005c\u005cd"
                }
            ]
        },
        "blocks": {
            "patterns": [
                {
                    "name": "emphasis",
                    "match": "{|}|[|]|(|)"
                }
            ]
        },
        "basecalls": {
            "patterns": [
                {
                    "name": "keyword.control",
                    "match": "\u005c.|\u005c|"
                }
            ]
        },
        "outin": {
            "patterns": [
                {
                    "name": "entity.name.function",
                    "match": ";|,"
                }
            ]
        },
        "defines": {
            "patterns": [
                {
                    "name": "variable.name",
                    "match": "~|`|^"
                }
            ]
        },
        "maths": {
            "patterns": [
                {
                    "name": "keyword.operator",
                    "match": "+|-|*|/|%"
                }
            ]
        },
        "others": {
            "patterns": [
                {
                    "name": "keyword.other",
                    "match": "'|$"
                }
            ]
        }
    },
    "scopeName": "source.opp"
}
0

There are 0 answers