millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 123 forks source link

Add more face types for a little bit extra customizability #818

Closed Hamzehn closed 2 years ago

Hamzehn commented 2 years ago

Hi, I hope you're accepting changes like this that would fall under the nice-to-have category and not really the must-have one.

I like to tinker with Emacs themes and thought it would be nice to be able to have a more granular way of customizing the look and feel of the notebooks (mainly the code vs. markdown cells). But I noticed that currently all input cells have the same face ein:cell-input-area, so I just added sub types (like ein:cell-code-input-area and ein:cell-markdown-input-area) that inherit from that base face, and did the same for the prompt faces.

This allows one to do things like "flatten" markdown cells to the default background of the notebook, and change the styling of the headers to suit their needs. See example screenshot below:

image

dickmao commented 2 years ago

Great, thanks.