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

Feature Request [python.nanorc]: add f-string support #374

Open
jwest75674 opened this issue Jun 17, 2021 · 1 comment
Open

Feature Request [python.nanorc]: add f-string support #374

jwest75674 opened this issue Jun 17, 2021 · 1 comment

Comments

@jwest75674
Copy link

Newer versions of python have the super awesome format string / f-strings (https://www.python.org/dev/peps/pep-0498/)

However, these don't have syntax highlighting here just yet.
This appears complicated due to f-strings appearing within strings in regard to color, but this would be an awesome funcitonality.

@davidhcefx
Copy link
Contributor

davidhcefx commented Feb 3, 2024

There's a trick that by placing a highlighting rule after another, the text color will be applied by the latest rule. Maybe highlight strings first and then other syntaxes. But then the problem is we need lookahead assertions, which is not available in ERE regex.
Maybe we need to look into how other editor done this.

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

2 participants