Skip to content

Commit

Permalink
Added char lists syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassperez committed Apr 29, 2021
1 parent c3cb96e commit 110ce1f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions syntax/elixir.vim
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ syn region elixirStruct matchgroup=elixirStructDelimiter start="%\(\w\+{\)\@=" e

syn region elixirMap matchgroup=elixirMapDelimiter start="%{" end="}" contains=ALLBUT,@elixirNotTop fold

syn region elixirString matchgroup=elixirStringDelimiter start=+\z('\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@Spell,@elixirStringContained
syn region elixirCharList matchgroup=elixirCharListDelimiter start=+\z('\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@Spell
syn region elixirString matchgroup=elixirStringDelimiter start=+\z("\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@Spell,@elixirStringContained
syn region elixirString matchgroup=elixirStringDelimiter start=+\z('''\)+ end=+^\s*\z1+ contains=@Spell,@elixirStringContained
syn region elixirString matchgroup=elixirStringDelimiter start=+\z("""\)+ end=+^\s*\z1+ contains=@Spell,@elixirStringContained
Expand All @@ -88,7 +88,7 @@ syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\|
syn region elixirBlock matchgroup=elixirBlockDefinition start="\<do\>:\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\<fn\>" end="\<end\>" contains=ALLBUT,@elixirNotTop fold

syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigil,elixirAnonymousFunction,elixirComment
syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigil,elixirAnonymousFunction,elixirComment,elixirCharList,elixirCharListDelimiter

syn match elixirDelimEscape "\\[(<{\[)>}\]/\"'|]" transparent display contained contains=NONE

Expand Down Expand Up @@ -230,10 +230,12 @@ hi def link elixirRegexCharClass elixirSpecial
hi def link elixirRegexQuantifier elixirSpecial
hi def link elixirSpecial Special
hi def link elixirString String
hi def link elixirCharList Identifier
hi def link elixirSigil String
hi def link elixirDocStringDelimiter elixirStringDelimiter
hi def link elixirDocSigilDelimiter elixirSigilDelimiter
hi def link elixirStringDelimiter Delimiter
hi def link elixirCharListDelimiter Identifier
hi def link elixirRegexDelimiter Delimiter
hi def link elixirInterpolationDelimiter Delimiter
hi def link elixirSigilDelimiter Delimiter
Expand Down

0 comments on commit 110ce1f

Please sign in to comment.