python-syntax icon indicating copy to clipboard operation
python-syntax copied to clipboard

Request: Highlight expressions in f-strings as code.

Open sgtlaggy opened this issue 8 years ago • 4 comments
trafficstars

Something like this, so the expressions look like code instead of the entire expression being highlighted the same.

f'a{b}c'

sgtlaggy avatar May 21 '17 05:05 sgtlaggy

Are you requesting that the bracketed area (b in this case) to just be highlighted normally?

nfnty avatar May 21 '17 09:05 nfnty

Yes. For example, in this screenshot ctx.guild would be colored the same as the os.path.abspath. image

sgtlaggy avatar May 21 '17 21:05 sgtlaggy

I think this is the same as @mikevb1 requested, but basically I'd want the { and } to be SPECIAL as they currently are, but everything between the brackets to be highlighted as if it were just standing on its own line.

pokey avatar Jan 04 '18 16:01 pokey

this gist could be useful (not my work)

adigitoleo avatar Nov 27 '20 13:11 adigitoleo