Philipp Lenssen
Philipp Lenssen

Reputation: 9218

Turn function names (of function headers) bold in VS Code

In Visual Studio Code, how can I embold the C# function name in functions (but not the function calls, only the headers)? E.g. via adjusting settings.json textMateRules entity.name.function, or any other approach. The end result should be like this, having functions serve as quasi-headlines in the code flow:

void Foo()
{
    int i = 0;
}

void Bar()
{
     Foo();
}

(The question has been marked as a duplicate of how to embolden all but comments, but that's not the same, unfortunately. I'm specifically interested how to embolden just function names, as described above.)

Upvotes: 2

Views: 2756

Answers (1)

codenumb
codenumb

Reputation: 61

I was looking for something similar for my C Development.

This is my settings.json file:

{
    "C_Cpp.default.cStandard": "c99",
    "C_Cpp.default.intelliSenseMode": "gcc-x64",
    "javascript.suggest.completeFunctionCalls": true,
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "meta.function",
                "settings": {
                    "fontStyle": "bold"
                }
            }
        ]
    }
}

And my VS Code editor has changed to like this:

example screenshot

Upvotes: 5

Related Questions