Change style of IDEA in Org Mode

Can’t figure out how to change the colour of IDEA in Org Mode

I’m rolling my own custom doom theme, and I’m doing some styling for org files. I can change the colours and styles for TODO and DONE, but not IDEA. It just seems to inherit the colour for TODO, and I would like to easily visually distinguish them.

Thanks for the help!

Have you had a look in doom’s org config (lines 144 ff.)?

https://github.com/doomemacs/doomemacs/blob/050624d47532cef18fcb41daa4e626576b00659c/modules/lang/org/config.el#L144

Thanks for the reply, but I’m not sure how to incorporate that into my theme (I’m an elisp novice).

I’m guessing I should incorporate it into my theme.el file, and not try and directly edit the org config?

Can I add a new entry in the org-todo-keyword-faces variable and pass it something like “:foreground blue” for instance right there?

(custom-declare-face '+org-todo-idea `((t :weight bold :foreground ,(doom-color 'cyan))) "IDEA todo keyword")

(setq org-todo-keyword-faces
'(("IDEA" . +org-todo-idea)))

Something like this? I at least have a similar thing in my config, first define a face and then assign it.

Thanks! I think that has got me most of the way there.

When I include this in my config.el as written, IDEA just inherits the colour of the heading. If I replace the doom-color function call with a string (colour name or hex code) it works though.

I haven’t figured out how to insert it into my doom theme yet, so I need to run space h r r to reload the config after startup for it to respect the changes.

You can use C-x C-e on the expression to evaluate instead of having to reload everything when you’re developing your theme.

I’ve never written a theme, but I guess what’s happening is that the theme is loaded before you declare your custom faces?

Thanks, but I figured out to avoid that now. The trick was to use the !after function to load it after org. For anyone interested, the code snippet in my config.el to style IDEA is now,

(after! org
  (custom-declare-face '+org-todo-idea `((t :weight bold :foreground "#94e2d5")) "IDEA todo keyword")
  (setq org-todo-keyword-faces
        '(("[-]"  . +org-todo-active)
          ("STRT" . +org-todo-active)
          ("[?]"  . +org-todo-onhold)
          ("WAIT" . +org-todo-onhold)
          ("HOLD" . +org-todo-onhold)
          ("PROJ" . +org-todo-project)
          ("NO"   . +org-todo-cancel)
          ("IDEA" . +org-todo-idea)
          ("KILL" . +org-todo-cancel))))

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.