Skip to content

Commit 73ed57b

Browse files
committed
Add font-lock to arrows
1 parent e0d0466 commit 73ed57b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

elixir-mode.el

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@
182182
(zero-or-more (any "A-Z" "a-z" "_" "0-9"))))
183183
(optional (or "!" "?"))
184184
symbol-end))
185+
(arrows . ,(rx (or "->" "<-" "=>" "|>")))
185186
(pseudo-var . ,(rx symbol-start
186187
(optional (or "%" "&"))
187188
(or "_" "__MODULE__" "__DIR__" "__ENV__" "__CALLER__"
@@ -435,6 +436,10 @@ is used to limit the scan."
435436
(,(elixir-rx (group pseudo-var))
436437
1 font-lock-constant-face)
437438

439+
;; Arrows
440+
(,(elixir-rx (group arrows))
441+
1 font-lock-keyword-face)
442+
438443
;; Code points
439444
(,(elixir-rx (group code-point))
440445
1 font-lock-negation-char-face)))

0 commit comments

Comments
 (0)