micro-editor / micro-editor/micro
[Feature Request] syntax coloring of Python f-strings by default
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
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):
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):
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:
Specifications
$ micro --version
Version: 2.0.14
Commit hash: 04c57704
Compiled on August 27, 2024
Commit hash: 04c57704
OS: Linux
Terminal: Ghostty
(Same behavior on macOS with micro 2.0.14)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation file or test is named. Start by locating micro's Python syntax-highlighting rules and reproduce the documented f-string examples; compare how expressions inside f-strings are currently classified. Done means Python f-strings visibly highlight their embedded expressions by default, with relevant syntax-highlighting tests updated if they exist.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100