I've been using VS Code for Python for a while now, but after all this time I still haven't figured out how to syntax highlight my f-strings. I've seen screenshots of other people who have them highlighted properly, but mine look like this:
Is this something I have to manually change in my color scheme?
Can it output the correct result? In other words, f-string can work?
Have you tried to switch the color theme?
And can you open the Command Palette
to execute the command of Developer: Inspect Editor Tokens and Scopes
to get this:
Can you find the meta.fstring.python
like the above picture?
This could be provided by the Built-in
extension of Python Language Basic
or MagicPython
extension and so on. So could you disable all the python related extensions then only enable the Python and Built-in
extension of Python Language Basic
to make a try?