You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users may want to display code, and having syntax highlighting is important for readability.
We need an API that can be used to turn a string of code into a highlighted AnnotatedString. On the bridge side, the styling must come from the EditorScheme, and on the standalone side, we should use the defaults for Light and Dark themes. On the bridge side, we expect fully semantic highlighting where supported by the current IDE, and on the standalone side, we expect basic syntax-based highlighting. On the bridge side, all the languages supported by the current IDE must be supported, and on the standalone side we must support at a minimum Kotlin, Java, XML, JSON, JS, TS, HTML, CSS, Python. Other languages support is nice to have but not required.
Thoughts:
Highlighting depends on the EditorScheme in bridge, and theme in standalone. If it is possible to avoid re-computing the highlighing info (e.g., determining code semantics) but limit ourselves to creating a new AnnotatedString with updated spans, this would be preferable for perf reasons.
The styling scheme should be stored in a composition local, and accessible via a theme-level getter, such as JewelTheme.codeStyling
Styling should follow the usual pattern of "definition in foundation, implementations in standalone and bridge"
The text was updated successfully, but these errors were encountered:
Users may want to display code, and having syntax highlighting is important for readability.
We need an API that can be used to turn a string of code into a highlighted AnnotatedString. On the bridge side, the styling must come from the EditorScheme, and on the standalone side, we should use the defaults for Light and Dark themes. On the bridge side, we expect fully semantic highlighting where supported by the current IDE, and on the standalone side, we expect basic syntax-based highlighting. On the bridge side, all the languages supported by the current IDE must be supported, and on the standalone side we must support at a minimum Kotlin, Java, XML, JSON, JS, TS, HTML, CSS, Python. Other languages support is nice to have but not required.
Thoughts:
JewelTheme.codeStyling
The text was updated successfully, but these errors were encountered: