I want to highlight certain words to a color using highlight-regexp. The words I want to highlight are "fn", "let", "mut", etc. for rust development.
The code I have so far is this:
(add-hook 'rust-mode-hook '(lambda () (highlight-regexp "\(let\|fn\|mut\)" font-lock-constant-face)))
Which does not give me any highlighting. However, when I regex for only a single word it does work:
(add-hook 'rust-mode-hook '(lambda () (highlight-regexp "let" font-lock-constant-face)))
So I figure it must be something wrong with my regex. How do I regex for any of these groups?