@@ -0,0 +1,146 @@
1+["when" "and" "or" "not in" "not" "in" "fn" "do" "end" "catch" "rescue" "after" "else"] @keyword
3+[(true) (false) (nil)] @constant.builtin
22+(escape_sequence) @escape
24+(call function: (function_identifier) @keyword
25+ (#match? @keyword "^(defmodule|defexception|defp|def|with|case|cond|raise|import|require|use|defmacrop|defmacro|defguardp|defguard|defdelegate|defstruct|alias|defimpl|defprotocol|defoverridable|receive|if|for|try|throw|unless|reraise|super|quote|unquote|unquote_splicing)$"))
27+(call function: (function_identifier) @keyword
29+ function: (function_identifier) @function
31+ [(identifier) @variable.parameter
32+ (_ (identifier) @variable.parameter)
33+ (_ (_ (identifier) @variable.parameter))
34+ (_ (_ (_ (identifier) @variable.parameter)))
35+ (_ (_ (_ (_ (identifier) @variable.parameter))))
36+ (_ (_ (_ (_ (_ (identifier) @variable.parameter)))))]))
40+ function: (function_identifier) @function
42+ [(identifier) @variable.parameter
43+ (_ (identifier) @variable.parameter)
44+ (_ (_ (identifier) @variable.parameter))
45+ (_ (_ (_ (identifier) @variable.parameter)))
46+ (_ (_ (_ (_ (identifier) @variable.parameter))))
47+ (_ (_ (_ (_ (_ (identifier) @variable.parameter)))))]))
50+ left: (identifier) @variable.parameter
51+ operator: _ @function
52+ right: (identifier) @variable.parameter)]
53+ (#match? @keyword "^(defp|def|defmacrop|defmacro|defguardp|defguard|defdelegate)$")
54+ (#match? @variable.parameter "^[^_]"))
56+(call (function_identifier) @keyword
58+ function: (function_identifier) @function)
59+ (identifier) @function
63+ function: (function_identifier) @function)
64+ (identifier) @function]
66+ (#match? @keyword "^(defp|def|defmacrop|defmacro|defguardp|defguard|defdelegate)$"))
70+ left: (bare_arguments
71+ [(identifier) @variable.parameter
72+ (_ (identifier) @variable.parameter)
73+ (_ (_ (identifier) @variable.parameter))
74+ (_ (_ (_ (identifier) @variable.parameter)))
75+ (_ (_ (_ (_ (identifier) @variable.parameter))))
76+ (_ (_ (_ (_ (_ (identifier) @variable.parameter)))))]))
77+ (#match? @variable.parameter "^[^_]"))
81+ (call (identifier) @attribute
85+ (heredoc_end)] @doc))
86+ (#match? @attribute "^(doc|moduledoc)$"))
91+ operator: "@" @attribute
93+ function: (function_identifier) @attribute)
94+ (identifier) @attribute])
97+ operator: _ @operator)
100+ operator: _ @operator)
105+ (heredoc_end)] @string)
110+ (string_end)] @string)
112+(sigil_start) @string.special
113+(sigil_content) @string
114+(sigil_end) @string.special
117+ "#{" @punctuation.special
118+ "}" @punctuation.special)
124+] @punctuation.delimiter
135+] @punctuation.bracket
137+[(identifier) @function.special
138+ (#match? @function.special "^__.+__$")]
140+[(remote_identifier) @function.special
141+ (#match? @function.special "^__.+__$")]
143+[(identifier) @comment
144+ (#match? @comment "^_")]