Fork me on GitHub
Mario C.17:01:20

Certain words get color coded differently in comments such as TODO or NOTE . How can I add more words to the list of "comment keywords", for a lack of a better term?


@mario.cordova.862 I just read something about that the other day, I think I was looking through Font faces. I assume that is where it is. Maybe there is something in SPC SPC customize that might help you narrow down your seach?


If its just using org-mode configuration, then this is what I do to define states and colours


@mario.cordova.862 It seems I found it. If you SPC SPC customize and search for todo in the cusomize buffer, it should take you to Global Hl Todo Mode and a list of other faces. In the Hl Todo Keyword Faces section, you can find an alist of existing keyworkds (text to highlight). You can change the colours and values of the keywords. At the bottom of the list in the Ins button, so you can add more. These are the same keywords as defined in so I assume this project is used in Spacemacs. It should be possible to add code to the dotspacemacs/user-config in your .spacemacs file to set these programatically.


I just added this to the dotspacemacs/user-config section of my .spacemacs file and rebooted. It seems to work quite nicely. Keywords are case sensitive, so todo is different from TODO.

  ;; Set Hightlight keywords

  (setq hl-todo-keyword-faces
        '(("TODO" . "SlateGray")
          ("DOING" . "DarkOrchid")
          ("BLOCKED" . "Firebrick")
          ("REVIEW" . "Teal")
          ("DONE" . "ForestGreen")
          ("ARCHIVED" .  "SlateBlue")))

Mario C.21:01:45

@jr0cket Thank you!! I couldn't figure what the right terms were to google this. Some solutions online didn't seem quite right! :thumbsup:


Terminology in Emacs is a whole new world, still much of an undiscovered country for me. I only had an idea because I had been playing around with the evaluation markers in the fringe, to make them stand out more (arriving in a pull request in the next week or so I hope). I would be interested to know what colours and keywords you find useful