Pylance-release: Syntax Highlighting changed by Pylance

Created on 8 Sep 2020  ·  8Comments  ·  Source: microsoft/pylance-release

Environment data

  • Python Extension v2020.9.106814-dev
  • Language Server version: v2020.9.0
  • OS and version: Win 10.0.19041.423
  • Python version 2.7.18 64

Expected behaviour

Syntax highlighting is left to the theme and unaffected by the language server plugin.

Actual behaviour

After the python extension finishes loading the colors change from this 👍
one_dark_shl
to this ☹
pylance_shl

There is nothing in the logs or anywhere to find. Since I'm on the Insider build and on the Pylance preview I suppose thats something new? Since I have never seen it before?
Is there a setting for this?

triage

Most helpful comment

This is related to new support for semantic highlighting

{
    "[python]": {
        "editor.semanticHighlighting.enabled": false
    }
}

see https://code.visualstudio.com/docs/getstarted/themes#_editor-semantic-highlighting
for more info

or issue #323

All 8 comments

I'm using the One Dark Pro theme but the default one is also affected!

This is related to new support for semantic highlighting

{
    "[python]": {
        "editor.semanticHighlighting.enabled": false
    }
}

see https://code.visualstudio.com/docs/getstarted/themes#_editor-semantic-highlighting
for more info

or issue #323

Ooh Dang! Thanks! I saw this one and immediately though: No that's not my issue 🙈

So basically: Its not a bug! It's a feature!!🙂 And I really appreciate it!

It's just: Currently the themes do not (yet) make wise use of it, right?

@ewerybody, please respond back to this is the disabling does not work

what?

ehm. The disabling works. I'm sorry. The "_Thanks_" was supposed to state that.

This issue has come back for me, even after adding this fix

{
    "[python]": {
        "editor.semanticHighlighting.enabled": false
    }
}

to my settings.

EDIT: to clarify, this fix used to work, and now it doesn't.

EDIT2: after switching to a new theme, switching back, and refreshing, the syntax highlighting reverted back to what it should be. Proper syntax highlighting persisted after closing and reopening vscode, so..... I'm stumped.

Pylance just serves the data to VS Code; that setting is VS Code's toggle. They might have a bug or something. Maybe it's to do with trying to set it in the [python] block?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iwoloschin picture iwoloschin  ·  3Comments

andyljones picture andyljones  ·  5Comments

DannyNemer picture DannyNemer  ·  3Comments

flaree picture flaree  ·  4Comments

yankyhoffman picture yankyhoffman  ·  5Comments