Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ability to modify CodeMirror colors #15560

Open
n-splv opened this issue Dec 25, 2023 · 3 comments
Open

The ability to modify CodeMirror colors #15560

n-splv opened this issue Dec 25, 2023 · 3 comments
Labels
enhancement pkg:codemirror tag:Extension Idea Ideas for interesting extensions that live outside of JupyterLab core.

Comments

@n-splv
Copy link

n-splv commented Dec 25, 2023

Problem

After upgrading from 3.6.4 to 4.0.9 I found some unpleasant visual changes, that made me rollback.
For instance, the square and curly braces are too faded, the spaces between lines are too large, f-strings are purple and so on.

Screenshot 2023-12-25 at 19 24 18 Screenshot 2023-12-25 at 19 26 11

I tried to apply the previous style to the new version by copying the contents of my-conda-env/share/jupyter/lab/themes/@jupyterlab directory from the old environment with Jupyterlab v3.6.4 to the new one as proposed here, but it didn't help.

Proposed Solution

AFAIK it's not Jupyter's decision to alter the code editor colors: you've just adopted a newer version of CodeMirror. While it might be beneficial to make the brackets less annoying noticeable in languages like JS, this is not the case for Python, which is the most popular language in Jupyter. It would be great if you gave this a second thought.

Meanwhile, please help me understand whether it's possible to manually revert to the old editor style on the new version. Thanks!

Copy link

welcome bot commented Dec 25, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Dec 25, 2023
@JasonWeill
Copy link
Contributor

@nick-maykr Thank you for opening this issue! In JupyterLab 4, we upgraded CodeMirror from major version 5 to 6. This change affected a lot of CodeMirror's functionality and organization, and required JupyterLab to make changes to accommodate the upgrade. You can see more details on CodeMirror's migration guide. I'm not sure whether you can use CodeMirror 5's style in CodeMirror 6; what is more likely is creating a new CodeMirror 6 style that looks like version 5. This may be a good use case for a new extension or theme.

@JasonWeill JasonWeill added tag:Extension Idea Ideas for interesting extensions that live outside of JupyterLab core. and removed status:Needs Triage Applied to new issues that need triage labels Jan 2, 2024
@krassowski
Copy link
Member

@n-splv you may like the new jupyterlab-rainbow-brackets extension; I know that from the name it sounds opposite to what you are trying to achieve but hear me out: your rainbow can be all black because it is fully customizable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pkg:codemirror tag:Extension Idea Ideas for interesting extensions that live outside of JupyterLab core.
Projects
None yet
Development

No branches or pull requests

3 participants