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

f-strings interpolation is not highlighted as code #69

Open
bew opened this issue Feb 12, 2020 · 3 comments
Open

f-strings interpolation is not highlighted as code #69

bew opened this issue Feb 12, 2020 · 3 comments

Comments

@bew
Copy link

bew commented Feb 12, 2020

Hello, I noticed that the new format strings are not highlighted using semchi:

This is what I have using semchi:
image
bar is not highlighted differently from the string around it, it's not clear that there is an interpolation or not here.
When the interpolation has some special words (var not defined, self, ..), it is highlighted though, but it's minimal:
image

This is what I had using the plugin python-syntax only:
image
It's slightly better

I think the braces should be highlighted like normal parentheses, and the interpolation code like normal code if possible.


There are similar issues about incorrect highlighting offsets in f-strings, but I think this is different, it's more about the interpolation code that is highlighted like a string and not as code.

@wookayin
Copy link
Contributor

I think this is a duplicate of #31. @numirias said it is due to a Python bug; refer to the thread for details.

@bew
Copy link
Author

bew commented Mar 10, 2020

I've read #31 but I think it's different, there is no highlight in my case, and when something is highlighted there is no offset problem (unless it's in a multiline f-string, but then it's definitely #31).

@willir
Copy link

willir commented Dec 25, 2020

I have the same issue (not highlighting for f-strings) and agree that it is a major problem. Probably have to use python-syntax instead, even though it is generally inferior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants