Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python code are not rendered in correct colors in "Visual Studio Dark" and "Default Dark Modern" theme #6114

Open
goldenbull opened this issue Jul 10, 2024 · 1 comment
Assignees

Comments

@goldenbull
Copy link

Type: Bug

how to reproduce

When using the theme Visual Studio Dark, python codes are not well colored, but the raw string is displayed correctly.

When switched to the theme Default Dark Modern, more colors are shown for python code, but the escaping backslash \ in raw string is not displayed correctly.

vscode-bug

system info

Extension version: 2024.10.0
VS Code version: Code 1.91.0 (ea1445cc7016315d0f5728f8e8b12a45dc0a7286, 2024-07-01T18:52:22.949Z)
OS version: Windows_NT x64 10.0.20348
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.11
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
  • Value of the python.languageServer setting: Default
User Settings


languageServer: "Pylance"

Installed Extensions
Extension Name Extension Id Version
Black Formatter ms-python.black-formatter 2024.2.0
DolphinDB dolphindb.dolphindb-vscode 3.0.100
JavaScript Debugger ms-vscode.js-debug 1.91.0
JavaScript Debugger Companion Extension ms-vscode.js-debug-companion 1.1.2
Markdown All in One yzhang.markdown-all-in-one 3.6.2
Markdown PDF yzane.markdown-pdf 1.5.0
Pylance ms-python.vscode-pylance 2024.7.1
Python ms-python.python 2024.10.0
Python Debugger ms-python.debugpy 2024.6.0
Remote - SSH ms-vscode-remote.remote-ssh 0.112.0
Remote - SSH: Editing Configuration Files ms-vscode-remote.remote-ssh-edit 0.86.0
Remote Explorer ms-vscode.remote-explorer 0.4.3
Table Visualizer for JavaScript Profiles ms-vscode.vscode-js-profile-table 1.0.9
Vue - Official Vue.volar 2.0.8
System Info
Item Value
CPUs Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz (16 x 2200)
GPU Status 2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: unavailable_software
Load (avg) undefined
Memory (System) 32.00GB (2.92GB free)
Process Argv --crash-reporter-id a361c834-537f-4f56-92bb-b55095492d3d
Screen Reader yes
VM 100%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
jchc7451:31067544
chatpanelc:31048052
dsvsc021:30996838
9c06g630:31013171
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
newcmakeconfigv2:31071590
legacy_priority:31082724

@brettcannon brettcannon transferred this issue from microsoft/vscode-python Jul 10, 2024
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Jul 10, 2024
@debonte
Copy link
Contributor

debonte commented Jul 10, 2024

This is a bug in our TextMate grammar (https://github.com/MagicStack/MagicPython). There's some discussion about possible approaches to fixing all of our issues of this type in #5824. That issue also includes a list of isses that have been filed against MagicPython on escape sequences in raw strings, so it's a known pain point. We haven't decided how to address this class of issue yet.

@debonte debonte added textmate bug and removed needs repro Issue has not been reproduced yet labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants