@@ -8,6 +8,9 @@ file_extensions:
88first_line_match : ^#!/.*\belixir
99scope : source.elixir
1010
11+ variables :
12+ module_name : ' \b[A-Z]\w*\b'
13+
1114contexts :
1215 main :
1316 - match : \b(fn)\b(?!.*->)
@@ -308,7 +311,7 @@ contexts:
308311 captures :
309312 1 : keyword.control.module.elixir
310313 pop : true
311- - match : ' \b[A-Z]\w*\b '
314+ - match : ' {{module_name}} '
312315 scope : entity.name.class.elixir
313316 - match : ^\s*(defprotocol)\b
314317 captures :
@@ -319,7 +322,7 @@ contexts:
319322 captures :
320323 1 : keyword.control.protocol.elixir
321324 pop : true
322- - match : ' \b[A-Z]\w*\b '
325+ - match : ' {{module_name}} '
323326 scope : entity.name.protocol.elixir
324327 - match : ^\s*(defimpl)\b
325328 captures :
@@ -330,7 +333,7 @@ contexts:
330333 captures :
331334 1 : keyword.control.protocol.elixir
332335 pop : true
333- - match : ' \b[A-Z]\w*\b '
336+ - match : ' {{module_name}} '
334337 scope : entity.name.protocol.elixir
335338 - match : ' ^\s*(def|defmacro)\s+([a-zA-Z_]\w*(?:!|\?)?)(?:(\()|\s*)'
336339 captures :
@@ -437,7 +440,7 @@ contexts:
437440 - match : (?<!\.)\b(and|not|or|when|xor|in)\b
438441 comment : as above, just doesn't need a 'end' and does a logic operation
439442 scope : keyword.operator.elixir
440- - match : ' \b[A-Z]\w*\b '
443+ - match : ' {{module_name}} '
441444 scope : entity.name.class.elixir
442445 - match : ' \b(nil|true|false)\b(?![?!])'
443446 scope : constant.language.elixir
@@ -448,7 +451,7 @@ contexts:
448451 captures :
449452 1 : keyword.operator.definition.constant.elixir
450453 - match : (&)\d+
451- scope : variable .other.capture.elixir
454+ scope : constant .other.capture.elixir
452455 captures :
453456 1 : keyword.operator.capture.elixir
454457 - match : (&)\w+(?=\/\d|\()
0 commit comments