2

I use emacs for common lisp development. I noticed that the documentation string for functions is white and makes it hard for me to read.

Is there a way for me to change the color of this string?

enter image description here

Edit:

  • I am using doom-themes doom-gruvbox.
  • in the gruvbox.el file I have the following lines (not entirely sure what it's doing:
(comments       (if doom-gruvbox-brighter-comments magenta base6))
(doc-comments   (if doom-gruvbox-brighter-comments (doom-lighten magenta 0.2) (doom-lighten fg-alt 0.25)))

1 Answer 1

2

(This applies to Emacs generally. Dunno whether Doom overrides something and requires you to customize faces differently.)

Put your cursor on the doc string, and use C-u C-x =. That will show you the *Help* buffer with info about the character at the cursor position (point).

Near the bottom of that buffer you'll see the names of one or more faces used to highlight the text (that character at point). Click any of those face names, to see a complete description of it in *Help*. If the face described there is one that you want to change (e.g., its Foreground attribute is listed as, say, White), then click the link at the top of *Help* that says customize this face.

That takes you to a Customize buffer, where you can edit the face attributes. (You can click Show All Attributes, to show all face attributes.)

For example, change Foreground from White to Blue or whatever. You can use the Choose button to choose a color by its appearance.

When the face looks the way you want, as shown by the updated sample text, open the State menu and choose either Set for Current Session or Save for Future Sessions.

1
  • Thank you!! this is pretty amazing for emacs generally like you said. Nice one Drew
    – Vinn
    Jan 24, 2023 at 1:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.