Created
April 14, 2019 14:57
-
-
Save tmepple/368b053d95b3fda7a9ad1719c496abfe to your computer and use it in GitHub Desktop.
Elixir tmLanguage file (from master as of 2019-04-14) with old parameter highlighting merged in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>comment</key> | |
<string>Textmate bundle for Elixir Programming Language.</string> | |
<key>fileTypes</key> | |
<array> | |
<string>ex</string> | |
<string>exs</string> | |
</array> | |
<key>firstLineMatch</key> | |
<string>^#!/.*\belixir</string> | |
<key>foldingStartMarker</key> | |
<string>(after|else|catch|rescue|\-\>|\{|\[|do)\s*$</string> | |
<key>foldingStopMarker</key> | |
<string>^\s*((\}|\]|after|else|catch|rescue)\s*$|end\b)</string> | |
<key>keyEquivalent</key> | |
<string>^~E</string> | |
<key>name</key> | |
<string>Elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>begin</key> | |
<string>\b(fn)\b(?!.*->)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>$</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#core_syntax</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b[a-z_]\w*(?!\()\b</string> | |
<key>name</key> | |
<string>variable.parameter.function.anonymous.elixir</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>\b(fn)\b(?=.*->)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>(?>(->)|(when)|(\)))</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.operator.other.elixir</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.elixir</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.section.function.elixir</string> | |
</dict> | |
</dict> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#core_syntax</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b[a-z_]\w*(?!\()\b</string> | |
<key>name</key> | |
<string>variable.parameter.function.anonymous.elixir</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#core_syntax</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>^(?=.*->)((?![^"']*("|')[^"']*->)|(?=.*->[^"']*("|')[^"']*->))((?!.*\([^\)]*->)|(?=[^\(\)]*->)|(?=\s*\(.*\).*->))((?!.*\b(fn)\b)|(?=.*->.*\bfn\b))</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>(?>(->)|(when)|(\)))</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.operator.other.elixir</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.elixir</string> | |
</dict> | |
<key>3</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.section.function.elixir</string> | |
</dict> | |
</dict> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#core_syntax</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b[a-z_]\w*(?!\()\b</string> | |
<key>name</key> | |
<string>variable.parameter.function.anonymous.elixir</string> | |
</dict> | |
</array> | |
</dict> | |
</array> | |
<key>repository</key> | |
<dict> | |
<key>core_syntax</key> | |
<dict> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>begin</key> | |
<string>^\s*(defmodule)\b</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.module.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>\b(do)\b</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.module.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>meta.module.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>match</key> | |
<string>\b[A-Z]\w*(?=\.)</string> | |
<key>name</key> | |
<string>entity.other.inherited-class.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b[A-Z]\w*\b</string> | |
<key>name</key> | |
<string>entity.name.type.class.elixir</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>^\s*(defprotocol)\b</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.protocol.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>\b(do)\b</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.protocol.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>meta.protocol_declaration.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>match</key> | |
<string>\b[A-Z]\w*\b</string> | |
<key>name</key> | |
<string>entity.name.type.protocol.elixir</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>^\s*(defimpl)\b</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.protocol.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>\b(do)\b</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.protocol.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>meta.protocol_implementation.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>match</key> | |
<string>\b[A-Z]\w*\b</string> | |
<key>name</key> | |
<string>entity.name.type.protocol.elixir</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>^\s*(def|defmacro|defdelegate|defguard)\s+((?>[a-zA-Z_]\w*(?>\.|::))?(?>[a-zA-Z_]\w*(?>[?!]|=(?!>))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?))((\()|\s*)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.module.elixir</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>entity.name.function.public.elixir</string> | |
</dict> | |
<key>4</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.section.function.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>(\bdo:)|(\bdo\b)|(?=\s+(def|defmacro|defdelegate|defguard)\b)</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>constant.other.keywords.elixir</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.module.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>meta.function.public.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>$self</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>\s(\\\\)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.operator.other.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>,|\)|$</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>$self</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>(\b[a-z_]\w*)(\\\\)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>variable.parameter.function.public.elixir</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.operator.other.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>,|$</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>$self</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\b</string> | |
<key>name</key> | |
<string>keyword.control.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b[a-z_]\w*\b</string> | |
<key>name</key> | |
<string>variable.parameter.function.public.elixir</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>^\s*(defp|defmacrop|defguardp)\s+((?>[a-zA-Z_]\w*(?>\.|::))?(?>[a-zA-Z_]\w*(?>[?!]|=(?!>))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?))((\()|\s*)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.module.elixir</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>entity.name.function.private.elixir</string> | |
</dict> | |
<key>4</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.section.function.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>(\bdo:)|(\bdo\b)|(?=\s+(defp|defmacrop|defguardp)\b)</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>constant.other.keywords.elixir</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.control.module.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>meta.function.private.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>$self</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>\s(\\\\)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.operator.other.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>,|\)|$</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>$self</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>(\b[a-z_]\w*)(\\\\)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>variable.parameter.function.private.elixir</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.operator.other.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>,|$</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>$self</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\b</string> | |
<key>name</key> | |
<string>keyword.control.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b[a-z_]\w*\b</string> | |
<key>name</key> | |
<string>variable.parameter.function.private.elixir</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>@(module|type)?doc (~[a-z])?"""</string> | |
<key>comment</key> | |
<string>@doc with heredocs is treated as documentation</string> | |
<key>end</key> | |
<string>\s*"""</string> | |
<key>name</key> | |
<string>comment.block.documentation.heredoc</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>@(module|type)?doc ~[A-Z]"""</string> | |
<key>comment</key> | |
<string>@doc with heredocs is treated as documentation</string> | |
<key>end</key> | |
<string>\s*"""</string> | |
<key>name</key> | |
<string>comment.block.documentation.heredoc</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>@(module|type)?doc (~[a-z])?'''</string> | |
<key>comment</key> | |
<string>@doc with heredocs is treated as documentation</string> | |
<key>end</key> | |
<string>\s*'''</string> | |
<key>name</key> | |
<string>comment.block.documentation.heredoc</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>@(module|type)?doc ~[A-Z]'''</string> | |
<key>comment</key> | |
<string>@doc with heredocs is treated as documentation</string> | |
<key>end</key> | |
<string>\s*'''</string> | |
<key>name</key> | |
<string>comment.block.documentation.heredoc</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>@doc false is treated as documentation</string> | |
<key>match</key> | |
<string>@(module|type)?doc false</string> | |
<key>name</key> | |
<string>comment.block.documentation.false</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>@(module|type)?doc "</string> | |
<key>comment</key> | |
<string>@doc with string is treated as documentation</string> | |
<key>end</key> | |
<string>"</string> | |
<key>name</key> | |
<string>comment.block.documentation.string</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>(?<!\.)\b(do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defguardp?|defdelegate|defexception|defoverridable|exit|after|rescue|catch|else|raise|reraise|throw|import|require|alias|use|quote|unquote|super|with)\b(?![?!:])</string> | |
<key>name</key> | |
<string>keyword.control.elixir</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string> as above, just doesn't need a 'end' and does a logic operation</string> | |
<key>match</key> | |
<string>(?<!\.)\b(and|not|or|when|xor|in)\b</string> | |
<key>name</key> | |
<string>keyword.operator.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b[A-Z]\w*\b</string> | |
<key>name</key> | |
<string>entity.name.type.class.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b(nil|true|false)\b(?![?!])</string> | |
<key>name</key> | |
<string>constant.language.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b(__(CALLER|ENV|MODULE|DIR|STACKTRACE)__)\b(?![?!])</string> | |
<key>name</key> | |
<string>variable.language.elixir</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.variable.elixir</string> | |
</dict> | |
</dict> | |
<key>match</key> | |
<string>(@)[a-zA-Z_]\w*</string> | |
<key>name</key> | |
<string>variable.other.readwrite.module.elixir</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.variable.elixir</string> | |
</dict> | |
</dict> | |
<key>match</key> | |
<string>(&)\d+</string> | |
<key>name</key> | |
<string>variable.other.anonymous.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>&(?![&])</string> | |
<key>name</key> | |
<string>variable.other.anonymous.elixir</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.variable.elixir</string> | |
</dict> | |
</dict> | |
<key>match</key> | |
<string>\^[a-z_]\w*</string> | |
<key>name</key> | |
<string>variable.other.capture.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b0x[0-9A-Fa-f](?>_?[0-9A-Fa-f])*\b</string> | |
<key>name</key> | |
<string>constant.numeric.hex.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b\d(?>_?\d)*(\.(?![^[:space:][:digit:]])(?>_?\d)+)([eE][-+]?\d(?>_?\d)*)?\b</string> | |
<key>name</key> | |
<string>constant.numeric.float.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b\d(?>_?\d)*\b</string> | |
<key>name</key> | |
<string>constant.numeric.integer.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b0b[01](?>_?[01])*\b</string> | |
<key>name</key> | |
<string>constant.numeric.binary.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b0o[0-7](?>_?[0-7])*\b</string> | |
<key>name</key> | |
<string>constant.numeric.octal.elixir</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>:'</string> | |
<key>captures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>'</string> | |
<key>name</key> | |
<string>constant.other.symbol.single-quoted.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>:"</string> | |
<key>captures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>"</string> | |
<key>name</key> | |
<string>constant.other.symbol.double-quoted.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>(?>''')</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>Single-quoted heredocs</string> | |
<key>end</key> | |
<string>^\s*'''</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.single.heredoc.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>'</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>single quoted string (allows for interpolation)</string> | |
<key>end</key> | |
<string>'</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.single.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>(?>""")</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>Double-quoted heredocs</string> | |
<key>end</key> | |
<string>^\s*"""</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.double.heredoc.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>"</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>double quoted string (allows for interpolation)</string> | |
<key>end</key> | |
<string>"</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.double.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[a-z](?>""")</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>Double-quoted heredocs sigils</string> | |
<key>end</key> | |
<string>^\s*"""</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.heredoc.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[a-z]\{</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>sigil (allow for interpolation)</string> | |
<key>end</key> | |
<string>\}[a-z]*</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[a-z]\[</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>sigil (allow for interpolation)</string> | |
<key>end</key> | |
<string>\][a-z]*</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[a-z]\<</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>sigil (allow for interpolation)</string> | |
<key>end</key> | |
<string>\>[a-z]*</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[a-z]\(</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>sigil (allow for interpolation)</string> | |
<key>end</key> | |
<string>\)[a-z]*</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[a-z]([^\w])</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>sigil (allow for interpolation)</string> | |
<key>end</key> | |
<string>\1[a-z]*</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#interpolated_elixir</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>#escaped_char</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[A-Z](?>""")</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>Double-quoted heredocs sigils</string> | |
<key>end</key> | |
<string>^\s*"""</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.heredoc.literal.elixir</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[A-Z]\{</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>sigil (without interpolation)</string> | |
<key>end</key> | |
<string>\}[a-z]*</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.literal.elixir</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[A-Z]\[</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>sigil (without interpolation)</string> | |
<key>end</key> | |
<string>\][a-z]*</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.literal.elixir</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[A-Z]\<</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>sigil (without interpolation)</string> | |
<key>end</key> | |
<string>\>[a-z]*</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.literal.elixir</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[A-Z]\(</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>sigil (without interpolation)</string> | |
<key>end</key> | |
<string>\)[a-z]*</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.literal.elixir</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>~[A-Z]([^\w])</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>sigil (without interpolation)</string> | |
<key>end</key> | |
<string>\1[a-z]*</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.string.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>string.quoted.other.sigil.literal.elixir</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>symbols</string> | |
<key>match</key> | |
<string>(?<!:)(:)(?>[a-zA-Z_][\w@]*(?>[?!]|=(?![>=]))?|\<\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\-|\|>|=>|=~|=|/|\\\\|\*\*?|\.\.?\.?|>=?|<=?|&&?&?|\+\+?|\-\-?|\|\|?\|?|\!|@|\%?\{\}|%|\[\]|\^(\^\^)?)</string> | |
<key>name</key> | |
<string>constant.other.symbol.elixir</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.constant.elixir</string> | |
</dict> | |
</dict> | |
<key>comment</key> | |
<string>symbols</string> | |
<key>match</key> | |
<string>(?>[a-zA-Z_][\w@]*(?>[?!])?)(:)(?!:)</string> | |
<key>name</key> | |
<string>constant.other.keywords.elixir</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>(^[ \t]+)?(?=##)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.whitespace.comment.leading.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>(?!#)</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>begin</key> | |
<string>##</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.comment.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>\n</string> | |
<key>name</key> | |
<string>comment.line.section.elixir</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>(^[ \t]+)?(?=#)</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.whitespace.comment.leading.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>(?!#)</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>begin</key> | |
<string>#</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.comment.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>\n</string> | |
<key>name</key> | |
<string>comment.line.number-sign.elixir</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string> | |
matches questionmark-letters. | |
examples (1st alternation = hex): | |
?\x1 ?\x61 | |
examples (2rd alternation = escaped): | |
?\n ?\b | |
examples (3rd alternation = normal): | |
?a ?A ?0 | |
?* ?" ?( | |
?. ?# | |
the negative lookbehind prevents against matching | |
p(42.tainted?) | |
</string> | |
<key>match</key> | |
<string>(?<!\w)\?(\\(x[0-9A-Fa-f]{1,2}(?![0-9A-Fa-f])\b|[^xMC])|[^\s\\])</string> | |
<key>name</key> | |
<string>constant.numeric.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\+\+|\-\-|<\|></string> | |
<key>name</key> | |
<string>keyword.operator.concatenation.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\|\>|<~>|<>|<<<|>>>|~>>|<<~|~>|<~|<\|></string> | |
<key>name</key> | |
<string>keyword.operator.sigils_1.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>&&&|&&</string> | |
<key>name</key> | |
<string>keyword.operator.sigils_2.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string><\-|\\\\</string> | |
<key>name</key> | |
<string>keyword.operator.sigils_3.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>===?|!==?|<=?|>=?</string> | |
<key>name</key> | |
<string>keyword.operator.comparison.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>(\|\|\||&&&|\^\^\^|<<<|>>>|~~~)</string> | |
<key>name</key> | |
<string>keyword.operator.bitwise.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>(?<=[ \t])!+|\bnot\b|&&|\band\b|\|\||\bor\b|\bxor\b</string> | |
<key>name</key> | |
<string>keyword.operator.logical.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>(\*|\+|\-|/)</string> | |
<key>name</key> | |
<string>keyword.operator.arithmetic.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\||\+\+|\-\-|\*\*|\\\\|\<\-|\<\>|\<\<|\>\>|\:\:|\.\.|\|>|~|=>|&</string> | |
<key>name</key> | |
<string>keyword.operator.other.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>=</string> | |
<key>name</key> | |
<string>keyword.operator.assignment.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>:</string> | |
<key>name</key> | |
<string>punctuation.separator.other.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\;</string> | |
<key>name</key> | |
<string>punctuation.separator.statement.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>,</string> | |
<key>name</key> | |
<string>punctuation.separator.object.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\.</string> | |
<key>name</key> | |
<string>punctuation.separator.method.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\{|\}</string> | |
<key>name</key> | |
<string>punctuation.section.scope.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\[|\]</string> | |
<key>name</key> | |
<string>punctuation.section.array.elixir</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\(|\)</string> | |
<key>name</key> | |
<string>punctuation.section.function.elixir</string> | |
</dict> | |
</array> | |
</dict> | |
<key>escaped_char</key> | |
<dict> | |
<key>match</key> | |
<string>\\(x[\da-fA-F]{1,2}|.)</string> | |
<key>name</key> | |
<string>constant.character.escaped.elixir</string> | |
</dict> | |
<key>interpolated_elixir</key> | |
<dict> | |
<key>begin</key> | |
<string>#\{</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.section.embedded.begin.elixir</string> | |
</dict> | |
</dict> | |
<key>contentName</key> | |
<string>source.elixir</string> | |
<key>end</key> | |
<string>\}</string> | |
<key>endCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.section.embedded.end.elixir</string> | |
</dict> | |
</dict> | |
<key>name</key> | |
<string>meta.embedded.line.elixir</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#nest_curly_and_self</string> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>$self</string> | |
</dict> | |
</array> | |
</dict> | |
<key>nest_curly_and_self</key> | |
<dict> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>begin</key> | |
<string>\{</string> | |
<key>captures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.section.scope.elixir</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>\}</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#nest_curly_and_self</string> | |
</dict> | |
</array> | |
</dict> | |
<dict> | |
<key>include</key> | |
<string>$self</string> | |
</dict> | |
</array> | |
</dict> | |
</dict> | |
<key>scopeName</key> | |
<string>source.elixir</string> | |
<key>uuid</key> | |
<string>D00C06B9-71B2-4FEB-A0E3-37237F579456</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment