wolray / symbol-overlay

Highlight symbols with keymap-enabled overlays
332 stars 42 forks source link

Is it possible to use more than 8 colors? #100

Open alexei-28 opened 1 year ago

alexei-28 commented 1 year ago

Here customize:

cusomize

And here example: example

Is it possible to add more colors? At least 10 colors.

purcell commented 1 year ago

Yes, I think you can define some extra faces and then add them to symbol-overlay-faces.

alexei-28 commented 1 year ago

Yes, I think you can define some extra faces and then add them to symbol-overlay-faces.

I try like this, but it not help. Only 8 colors :-(

image

purcell commented 1 year ago

The buffer on the left doesn't show that the changes have been saved. Can you confirm that the variable system-overlay-faces now actually contains symbol-overlay-face-9 and symbol-overlay-face-10? (Use describe-variable, ie. C-h v)

alexei-28 commented 1 year ago

The buffer on the left doesn't show that the changes have been saved. Can you confirm that the variable system-overlay-faces now actually contains symbol-overlay-face-9 and symbol-overlay-face-10? (Use describe-variable, ie. C-h v)

When (in the left buffer) I select State -> Save for Future Sessions" I get error:

custom-variable-mark-to-save: Saving symbol-overlay-faces: Invalid face: symbol-overlay-face-9

purcell commented 1 year ago

You would also need to define the face using defface. Add something like this to your startup files:

(with-eval-after-load 'symbol-overlay
  (defface symbol-overlay-face-9
    '((t (:background "turquoise" :foreground "black")))
    "Symbol Overlay default candidate 9"
    :group 'symbol-overlay)

  (defface symbol-overlay-face-10
    '((t (:background "turquoise" :foreground "black")))
    "Symbol Overlay default candidate 10"
    :group 'symbol-overlay)

  (add-to-list 'symbol-overlay-faces 'symbol-overlay-face-9 t)
  (add-to-list 'symbol-overlay-faces 'symbol-overlay-face-10 t))

then all you need to do in the Custom interface is customize those two faces.

purcell commented 1 year ago

What was happening for you above was this:

alexei-28 commented 1 year ago

Here is a nice colors for using: MicrosoftTeams-image