Skip to content

Commit cc0470d

Browse files
committed
Highlight modules, records, protocols, impls as types
This is pretty much a copy of <https://github.com/secondplanet/elixir-mode/commit/878e52f70f13e7476c66b50745039791ada59ec1>, with the exception that this catches more types of interfaces/types. Thanks to @carlosmn for the work (-:
1 parent dc29a14 commit cc0470d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

elixir-mode.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@
223223
;; comments:
224224
'("#.*$" . font-lock-comment-face)
225225

226+
;; records and modules at point of definition:
227+
'("^\\s *def\\(module\\|record\\|protocol\\|impl\\)\\s +\\([^( \t\n,]+\\)" 2 font-lock-type-face)
228+
226229
;; methods:
227230
`(,(concat "^\\s *\\<" (regexp-opt elixir-mode-define-names t) "\\>\\s +\\([^( \t\n]+\\)") 2 font-lock-function-name-face)
228231

0 commit comments

Comments
 (0)