Syntax highlighting: Negative sign in numeric literals should use the number colour
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 54/100
Research direction
The issue names the SC-IDE code editor and the HelpBrowser's CodeMirror, but gives no file or test paths. Start by locating each editor's syntax highlighting rules and checking how numeric literals are tokenized. Done means a unary minus immediately before a number uses the number colour in both editors.
Written by the indexing model from the issue text.
Description
Motivation
Currently, in both the SC-IDE code editor and the HelpBrowser's CodeMirror, the negative sign (-) preceding a number is highlighted as an operator rather than being treated as part of the numeric literal. For example, when typing -2s or -1.9, the - symbol is rendered in the default operator colour (e.g., black in the default light theme), whereas the digits and their accidental suffixes are rendered in the number colour (e.g., purple). This creates an unnatural visual separation for what is logically a single numeric value.
Description of Proposed Feature
The syntax highlighting behaviour should be updated so that a unary negative sign immediately preceding a number is recognised visually as an integral part of the negative number literal. The - sign should share the exact same syntax highlighting colour as the rest of the numeric literal across both the SC-IDE and the HelpBrowser.
Plan for Implementation
I am not sure if I can implement this. Sorry for only requesting new features.
- Dominant language
- C++
- Stars
- 6.8k
- Forks
- 854
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 16
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from supercollider/supercollider
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 82/100
supercollider/supercollider#7872 · 1 comment ·
Maintainers usually reply within 1 day
-
comp: server plugins
Difficulty 1/5 1-3 hours Newbie friendliness 69/100
supercollider/supercollider#7860 · 1 reaction ·
Maintainers usually reply within 1 day
-
Fix minor problems in docsPossibly taken @Chr0mium24 claimed this 12 days ago. Openbug comp: help good-first-issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
supercollider/supercollider#7853 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
supercollider/supercollider#7726 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 75/100
supercollider/supercollider#7724 ·
Maintainers usually reply within 1 day
All issues in supercollider/supercollider
Similar issues
-
launcher: settings are never saved on macOS — QSettings SystemScope points to /Library/PreferencesOpen
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA-RTX/ShaderMake#29 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
yetanotherbrowser/yab#1062 ·
Maintainers usually reply within 1 day
-
bug I/O low priority semantics
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day