[209_17] Added separate light and dark mode color schemes for Python#2979
Open
1sh-repalto wants to merge 3 commits intoMoganLab:mainfrom
Open
Conversation
Contributor
|
@1sh-repalto Thank you for your code, I reviewed it and it is correct, but you need to add a test document in tests/tmu/, after that we can merge it! |
Contributor
Author
|
Hello @Yuki-Nagori , I have added the test file I verified the document loads and renders perfectly by running:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Follow-up PR for #2553
In the dark theme, the syntax highlighting for languages such as Python is also difficult to see.
Summary
This new approach creates seperate colour schemes for light and dark mode. It also aligns with Mogan's native styling system, allowing for instant theme updates, side-by-side theme support, and better performance.
Developer Document:
devel/209_17.mdIssues Found
The previous implementation used a single set of colors for both light and dark modes.
Changes
In
TeXmacs/plugins/python/progs/code/python-lang.scm:define-preferenceswith symbolic variable names (e.g.,syntax-python-keyword).notify-python-prefcallback to handle real-time preference updates.In
TeXmacs/plugins/python/packages/code/python.ts:syntax-python-*variables.In
TeXmacs/packages/themes/dark/dark.ts:syntax-python-*variables.How to Test
Document -> Theme -> DarkandDocument -> Theme -> Plain.seperate_dark_color_scheme.mp4
Light Mode
Dark Mode