File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 388
388
(and " <" (group (one-or-more (not (any " >" )))) " >" ))
389
389
1 font-lock-string-face )
390
390
391
+ ; ; TODO: Figure out why atoms are not being colored with `reference-face'
392
+ ; ; Atoms and singleton-like words like true/false/nil.
393
+ (,(elixir-rx (or (group atoms) (group bool-and-nil)))
394
+ 1 font-lock-reference-face)
395
+
391
396
; ; Built-in modules
392
397
(,(elixir-rx (group builtin-modules))
393
398
1 font-lock-constant-face )
396
401
(,(elixir-rx (group operators))
397
402
1 elixir-operator-face)
398
403
399
- ; ; Atoms and singleton-like words like true/false/nil.
400
- (,(elixir-rx (group (or atoms bool-and-nil)))
401
- 1 font-lock-reference-face)
402
-
403
404
; ; Code points
404
405
(,(elixir-rx (group code-point))
405
406
1 elixir-negation-face)))
Original file line number Diff line number Diff line change 29
29
(modify-syntax-entry ?\} " ){" table)
30
30
(modify-syntax-entry ?\[ " (]" table)
31
31
(modify-syntax-entry ?\] " )[" table)
32
- (modify-syntax-entry ?\ : " ' " table)
32
+ (modify-syntax-entry ?: " _ " table)
33
33
(modify-syntax-entry ?@ " _" table)
34
34
table)
35
35
" Elixir mode syntax table." )
Original file line number Diff line number Diff line change @@ -124,3 +124,16 @@ end"
124
124
(should (eq (elixir-test-face-at 2 ) 'font-lock-builtin-face ))
125
125
(should (eq (elixir-test-face-at 3 ) 'font-lock-string-face ))))
126
126
127
+ (ert-deftest elixir-mode-syntax-table/fontify-atoms ()
128
+ :tags '(fontification atom syntax-table)
129
+ (elixir-test-with-temp-buffer
130
+ " :oriole
131
+ :andale"
132
+ ; ; This is actually the wrong face. I thought I had set these up
133
+ ; ; to use `font-lock-reference-face' but apparently not. See the
134
+ ; ; TODO in `elixir-mode.el' on this.
135
+ (should (eq (elixir-test-face-at 3 ) 'font-lock-constant-face ))
136
+ (should (eq (elixir-test-face-at 5 ) 'font-lock-constant-face ))
137
+ (should (eq (elixir-test-face-at 10 ) 'font-lock-constant-face ))
138
+ (should (eq (elixir-test-face-at 13 ) 'font-lock-constant-face ))))
139
+
You can’t perform that action at this time.
0 commit comments