| 1 |
filetype: elixir |
| 2 |
|
| 3 |
detect: |
| 4 |
filename: "\\.ex$|\\.exs$" |
| 5 |
|
| 6 |
rules: |
| 7 |
- statement: "\\b(abs|trunc|rem|div|round|max|min|and|or|not|throw|raise|reraise|hd|tl|in|length|elem|put_elem|destructure|to_(string|charlist)|is_(atom|binary|bitstring|boolean|float|function|integer|list|map|nil|number|pid|port|reference|tuple)|(bit|byte|map|tuple)_size|binary_part|def(delegate|exception|guard|guardp|impl|macro|macrop|module|overridable|p|protocol|struct)?|sigil_[crswCRSWDNT]|if|else|unless|cond|binding|node|self|spawn|spawn_link|spawn_monitor|send|exit|struct|get_and_update_in|get_in|put_in|pop_in|update_in|apply|inspect|make_ref|use|do|end)\\b" |
| 8 |
- statement: "\\b(alias|import|require|case|fn|receive|after|try|catch|rescue|super|quote|unquote|unquote_splicing|for|with)\\b" |
| 9 |
|
| 10 |
- constant: "\\b\\[A-Z]+\\b" |
| 11 |
- constant.number: "\\b[0-9]+\\b" |
| 12 |
|
| 13 |
- constant.string: "`[^`]*`|%x\\{[^}]*\\}" |
| 14 |
- constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!" |
| 15 |
- constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!" |
| 16 |
|
| 17 |
- symbol.brackets: "\\{|\\}|\\[|\\]|\\(|\\)" |
| 18 |
|
| 19 |
- comment: "#[^{].*$|#$" |
| 20 |
- comment.bright: "##[^{].*$|##$" |
| 21 |
|
| 22 |
- type.keyword: "\\:[a-zA-Z][a-zA-Z0-9_]*" |
| 23 |
- type.keyword: "\\b(describe|test)" |
| 24 |
- statement: "\\b(expected|assert|assert_raise|assert_in_delta|assert_received|catch_error|catch_throw|flunk|refute|refute_in_delta|refute_received)\\b" |
| 25 |
- symbol.tag: "^\\s*\\@[a-zA-Z][a-zA-Z0-9_]*\\b" |
| 26 |
|
| 27 |
- identifier.macro: "\\b(__CALLER__|__DIR__|__ENV__|__MODULE__|__aliases__|__block__|defmacro)\\b" |
| 28 |
|
| 29 |
- todo: "(XXX|TODO|FIXME|\\?\\?\\?)" |
| 30 |
- preproc.shebang: "\\W*#!.+?( |$)" |