Syntax highlighting: Negative sign in numeric literals should use the number colour

Author: prkoCreated Sep 18, 2026Updated Sep 18, 2026
Labelsenhancement

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.

Image

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.

Source: supercollider/supercollider