Skip to content

[Feature Request] syntax coloring of Python f-strings by default #3605

@peterjc

Description

@peterjc

Description of the problem or steps to reproduce

Current behavior of micro is to treat Python f-strings like plain strings (yellow in the default color scheme):

Screenshot 2025-01-11 at 20 48 14

This example is taken from https://docs.python.org/3/reference/lexical_analysis.html#f-strings where the variables like name in the first f-string of this example are in white (screenshot with Firefox showing coloring of the expressions with f-strings):

Screenshot 2025-01-11 at 20 45 53

Desired behaviour would be like the Python.org documentation, or similar - this is Sublime Text Build 4189 on macOS which seems to format the code snippets within f-strings like normal Python code:

Screenshot 2025-01-11 at 20 51 21

Specifications

$ micro --version
Version: 2.0.14
Commit hash: 04c57704
Compiled on August 27, 2024

Commit hash: 04c5770
OS: Linux
Terminal: Ghostty

(Same behavior on macOS with micro 2.0.14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions