Skip to content

Commit 9ad2236

Browse files
committed
Add syntax highlighting to true/false/nil
1 parent 60aeb48 commit 9ad2236

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

elixir-mode.el

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
(* ?\\ ?\\)
124124
;; Match single or triple quotes of any kind.
125125
(group (or "\"" "\"\"\"" "'" "'''")))))
126+
(true-false-nil . ,(rx (or "true" "false" "nil")))
126127
(atoms . ,(rx ":"
127128
(or
128129
(and
@@ -366,6 +367,12 @@ is used to limit the scan."
366367
(,(elixir-rx (group module-names))
367368
1 font-lock-type-face)
368369

370+
;; True, false, nil
371+
(,(elixir-rx (group true-false-nil)
372+
(zero-or-more space)
373+
(optional "="))
374+
1 elixir-atom-face)
375+
369376
;; Atoms and singleton-like words like true/false/nil.
370377
(,(elixir-rx (group atoms)
371378
(zero-or-more space)

0 commit comments

Comments
 (0)