Unnamed repository; edit this file 'description' to name the repository.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
["when" "and" "or" "not in" "not" "in" "fn" "do" "end" "catch" "rescue" "after" "else"] @keyword

[(true) (false) (nil)] @constant.builtin

(keyword
 [(keyword_literal)
  ":"] @tag)

(keyword
 (keyword_string
  [(string_start)
   (string_content)
   (string_end)] @tag))

[(atom_literal)
 (atom_start)
 (atom_content)
 (atom_end)] @tag

[(comment)
 (unused_identifier)] @comment

(escape_sequence) @escape

(call function: (function_identifier) @keyword
      (#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)$"))

(call function: (function_identifier) @keyword
      [(call
        function: (function_identifier) @function
        (arguments
         [(identifier) @variable.parameter
          (_ (identifier) @variable.parameter)
          (_ (_ (identifier) @variable.parameter))
          (_ (_ (_ (identifier) @variable.parameter)))
          (_ (_ (_ (_ (identifier) @variable.parameter))))
          (_ (_ (_ (_ (_ (identifier) @variable.parameter)))))]))
       (binary_op
        left:
        (call
         function: (function_identifier) @function
         (arguments
          [(identifier) @variable.parameter
           (_ (identifier) @variable.parameter)
           (_ (_ (identifier) @variable.parameter))
           (_ (_ (_ (identifier) @variable.parameter)))
           (_ (_ (_ (_ (identifier) @variable.parameter))))
           (_ (_ (_ (_ (_ (identifier) @variable.parameter)))))]))
        operator: "when")
       (binary_op
        left: (identifier) @variable.parameter
        operator: _ @function
        right: (identifier) @variable.parameter)]
      (#match? @keyword "^(defp|def|defmacrop|defmacro|defguardp|defguard|defdelegate)$"))

(call (function_identifier) @keyword
      [(call
        function: (function_identifier) @function)
       (identifier) @function
       (binary_op
        left:
        [(call
          function: (function_identifier) @function)
         (identifier) @function]
        operator: "when")]
      (#match? @keyword "^(defp|def|defmacrop|defmacro|defguardp|defguard|defdelegate)$"))

(anonymous_function
 (stab_expression
  left: (bare_arguments
         [(identifier) @variable.parameter
          (_ (identifier) @variable.parameter)
          (_ (_ (identifier) @variable.parameter))
          (_ (_ (_ (identifier) @variable.parameter)))
          (_ (_ (_ (_ (identifier) @variable.parameter))))
          (_ (_ (_ (_ (_ (identifier) @variable.parameter)))))])))

(unary_op
 operator: "@"
 (call (identifier) @attribute
       (heredoc
        [(heredoc_start)
         (heredoc_content)
         (heredoc_end)] @doc))
 (#match? @attribute "^(doc|moduledoc)$"))

(module) @type

(unary_op
 operator: "@" @attribute
 [(call
   function: (function_identifier) @attribute)
  (identifier) @attribute])

(unary_op
 operator: _ @operator)

(binary_op
 operator: _ @operator)

(heredoc
 [(heredoc_start)
  (heredoc_content)
  (heredoc_end)] @string)

(string
 [(string_start)
  (string_content)
  (string_end)] @string)

(sigil_start) @string.special
(sigil_content) @string
(sigil_end) @string.special

(interpolation
 "#{" @punctuation.special
 "}" @punctuation.special)

[
 ","
 "->"
 "."
] @punctuation.delimiter

[
  "("
  ")"
  "["
  "]"
  "{"
  "}"
  "<<"
  ">>"
] @punctuation.bracket

(special_identifier) @function.special

(ERROR) @warning
t .s { color: #D5FF80 } /* Literal.String */ .highlight .na { color: #FFD173 } /* Name.Attribute */ .highlight .nb { color: #F28779 } /* Name.Builtin */ .highlight .nc { color: #5CCFE6 } /* Name.Class */ .highlight .no { color: #DFBFFF } /* Name.Constant */ .highlight .nd { color: #FFDFB3 } /* Name.Decorator */ .highlight .nf { color: #FFD173 } /* Name.Function */ .highlight .nt { color: #5CCFE6 } /* Name.Tag */ .highlight .ow { color: #F29E74 } /* Operator.Word */ .highlight .w { color: #CCCAC2 } /* Text.Whitespace */ .highlight .mb { color: #DFBFFF } /* Literal.Number.Bin */ .highlight .mf { color: #DFBFFF } /* Literal.Number.Float */ .highlight .mh { color: #DFBFFF } /* Literal.Number.Hex */ .highlight .mi { color: #DFBFFF } /* Literal.Number.Integer */ .highlight .mo { color: #DFBFFF } /* Literal.Number.Oct */ .highlight .sa { color: #D5FF80 } /* Literal.String.Affix */ .highlight .sb { color: #F29E74 } /* Literal.String.Backtick */ .highlight .sc { color: #D5FF80 } /* Literal.String.Char */ .highlight .dl { color: #D5FF80 } /* Literal.String.Delimiter */ .highlight .sd { color: #95E6CB; font-style: italic } /* Literal.String.Doc */ .highlight .s2 { color: #D5FF80 } /* Literal.String.Double */ .highlight .se { color: #D5FF80 } /* Literal.String.Escape */ .highlight .sh { color: #D5FF80 } /* Literal.String.Heredoc */ .highlight .si { color: #D5FF80 } /* Literal.String.Interpol */ .highlight .sx { color: #D5FF80 } /* Literal.String.Other */ .highlight .sr { color: #95E6CB } /* Literal.String.Regex */ .highlight .s1 { color: #D5FF80 } /* Literal.String.Single */ .highlight .ss { color: #D5FF80 } /* Literal.String.Symbol */ .highlight .bp { color: #F28779 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #FFD173 } /* Name.Function.Magic */ .highlight .vi { color: #FFCC66 } /* Name.Variable.Instance */ .highlight .vm { color: #5CCFE6; font-style: italic } /* Name.Variable.Magic */ .highlight .il { color: #DFBFFF } /* Literal.Number.Integer.Long */