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 122 forks source link

Variable/syntax colour and cell colour are the same #863

Open pseudobabble opened 1 year ago

pseudobabble commented 1 year ago

The input cell background colour and variable name or syntax character colour are the same on my setup, when text is unselected, or when it is selected with the mouse, but not when selected with C-SPC, which makes it very hard to see what is written in the input cell.

I suspect this is something to do with my setup, but I am not really an emacs expert. I'd love to use ein but this is preventing it from being workable.

Ideally, I'd like ein to use the same Doom theme that the rest of emacs is using, but I'll happily settle for just being able to see all the text in the input and output cells. Knowing the right way to customize these colours would be great.

Any assistance will be greatly appreciated.

emacs version 27.1, with Doom Emacs, with --daemon and emacsclient -t

No text selected: Screenshot from 2023-03-03 12-53-47

Text selected with mouse: Screenshot from 2023-03-03 12-56-10

Text selected with C-SPC: Screenshot from 2023-03-03 12-56-20

You can see what I mean in the second cell, which contains blah= 'blah'.

I can see that the colours defined for ein:cell-input-area in ein-cell.el are the ones that colour the text and selection highlighting, but no amount of fiddling I've done has changed them. Specifically I tried things along the line of:

(after! ein
(defface ein:cell-input-area
  '((((class color) (background light))
     :background "#f44336")
    (((class color) (background dark))
     :background "#383838"))
  "Face for cell input area"
  :group 'ein)
  )

I'm sure it's achievable by customizing faces, but I'm not proficient enough to do that properly.

Things I've already looked at: https://github.com/tkf/emacs-ipython-notebook/blob/master/lisp/ein-cell.el (I've tried messing in my config with the faces defined there, but not sufficiently up on elisp to make much sense of it) https://github.com/millejoh/emacs-ipython-notebook/pull/818 https://github.com/millejoh/emacs-ipython-notebook/issues/654 https://github.com/millejoh/emacs-ipython-notebook/issues/462 https://github.com/millejoh/emacs-ipython-notebook/issues/556 (tried (setq ein:polymode t) and looked at https://github.com/polymode/polymode/issues/232, no dice) https://github.com/millejoh/emacs-ipython-notebook/issues/855 https://github.com/millejoh/emacs-ipython-notebook/issues/602 https://github.com/millejoh/emacs-ipython-notebook/issues/205

Running emacs -nw -Q -f package-initialize -f ein:dev-start-debug resulted in Symbol’s function definition is void: ein:dev-start-debug in the minibuffer.