简体   繁体   中英

Syntax Highlighting/Coloring for Python in Visual Studio 2019 is not working

I cannot get the syntax highlighting to properly work in Python with Visual Studio 2019 Community Edition. I get very basic syntax highlighting/coloring but for example the curly braces in full = f"FirstName: {first} LastName: {last} " are not color coded differently from the rest of the string. I have seen this work in Visual Studio Code but I want the syntax highlighting to work in Visual Studio 2019 Community Edition. I did not install any specific plugins or extensions yet. Is there something I need to install?

Thanks

Currently, Visual Studio does not have support for formatted strings, so they will just appear as regular strings (it's actually a somewhat complex parsing problem to nest code and literals - I implemented it once, but it wasn't kept).

I'd recommend finding or reporting an issue on their issue tracker to let the team know that you're interested in support.

If you're having trouble with other aspects of syntax highlighting, such as class and function names, you could also file an issue and the team will help you out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM