skip to Main Content

Recently, I’m trying to move from VSCode to VSCodium,
and I found a problem is that the green coloring of modules are not in VSCodium (like the picture below).

screenshot

left: VSCode, has the green syntax / right: VSCodium, doesn’t have the green syntax.

I saw some other screenshots on the internet that their VSCode also don’t have the green syntax, so I think it’s not a VScodium problem but I still can’t figure out what makes them different.

2

Answers


  1. This is provided by Pylance.

    You can add the following codes to your settings.json:

    "python.languageServer": "Pylance",
    
    Login or Signup to reply.
  2. This is related to two settings:

    The green syntax will only be displayed when you need to set to the following at the same time.

    "editor.semanticHighlighting.enabled": true,    
    "python.languageServer": "Pylance",
    

    That is, semantic highlighting is enabled, and the python language server is pylance.

    The python language server setting defaults to "Default": Automatically select a language server: Pylance if installed and available, otherwise fallback to Jedi. So it is possible to get green syntax without modifying this setting, if pylance is available on your machine.

    The default value of the "editor.semanticHighlighting.enabled" setting is "configuredByTheme": Semantic highlighting is configured by the current color theme’s semanticHighlighting setting., so whether to display green syntax may also be related to the theme you use.

    Via @wjandrea’s comment below on another question:

    I think this is related to the language server. If you still have Code installed, you could check by switching python.languageServer from Pylance to Jedi. Pylance is not supported in unofficial builds.

    If pyance is not available in VSCodium then green syntax is not available on it.

    A similar effect may be achieved by referring to custom color themes.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search