skip to Main Content

I would like to know how to enable the highlighting of function call in VS Code with python. See the following example where function call is blank, as other part of the code:

enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    Okay it was just about the theme that I was using ( Atom one dark theme ) that was not highlightning the function call. I switched to another one and it's now working.


  2. It seems that the colour theme you are using isn’t highlighting things in the way you want. You can change that. (see the Developer: Inspect Editor Tokens and Scopes command in the command palette) Ex.

    Semantic highlighting customization route (requires a language extension that provides semantic highlighting support for Python) (highlights both function definitions and calls):

    "editor.semanticTokenColorCustomizations": {
        "[Atom One Dark]": {
            "rules": {
                "function:python": {
                    "foreground": "#FF0000", // TODO
                    // "fontStyle": ""
                }
            }   
        }
    }
    

    ^the :python part will make the colour customization only apply to functions for the Python language.

    Token colour customization route (works without any extensions, since VS Code bundles TextMate grammar support for Python) (may require disabling extensions that provide semantic highlighting support for Python):

    "editor.tokenColorCustomizations": {
        "[Atom One Dark]": {
            "textMateRules": [
                {
                    "scope": "meta.function-call.python",
                    "settings": {
                        "foreground": "#FF0000", // TODO
                        // "fontStyle": ""
                    }
                }
            ]
        }
    },
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search