In VScode, when creating a language support extension, how do you capture a function parameter?

26 Views Asked by At

I'm creating a language extension for Max MSP GenExpr and I've used the built-in C language definition for the majority of the syntax highligting. I've used the scope token "storage.type" to define syntax colouring for Max Gen~ inlets and outlets and the syntax coloring works. However, wherever I use an inlet/outlet as a fucntion parameter the highlighting doesn't work. Using the Scope Inspector this is because the overriding scope is "meta.function.definition.parameters.c". I can't figure out how to capture the inlets and outlets as both the storage definitions and a function parameter so that the syntax hihglighting works for both.

This is how I've defined the highlighting for the non-function useage:

        "inlets": {
            "patterns": [{
                "name": "storage.type",
                "match": "\\b(in1|in2|in3|in4|in5|in6|in7|in8|in9|in10|in11|in12|in14|in14|in15|in16)\\b"
            }]
        },
0

There are 0 best solutions below