1
0
mirror of https://github.com/cmur2/joe-syntax.git synced 2024-12-22 12:54:23 +01:00

Add Elixir syntax highlighting

This commit is contained in:
Andrew Lisin 2015-01-08 18:00:26 +06:00
parent 9ac671740d
commit cb818c68e5
2 changed files with 259 additions and 0 deletions

244
elixir.jsf Normal file
View File

@ -0,0 +1,244 @@
# JOE syntax highlight file for Elixir
# Written by Andrey Lisin (at gmail.com)
=Idle
=Comment fg_030
=Keyword bold
=Bif fg_501
=String fg_110
=Extrapolation fg_200 bold
=Atom fg_530
=Attribute fg_505
=Brace fg_440
=Brack fg_311
=Int fg_033
=Def fg_115
=ModDef fg_101
=Underscore fg_310
:idle Idle
* idle
"#" line_comment noeat
"a-zA-Z" ident noeat
"_" underscore recolor=-1
"'" single_quoted recolor=-1
"\"" double_quoted recolor=-1
":" atom recolor=-1
"@" is_edoc noeat
"[]" brack recolor=-1
"{}" brace recolor=-1
"|" maybe_pipe
"\\" maybe_opt
"0-9" decimal recolor=-1
:line_comment Comment
* line_comment
"\n" idle
:single_quoted String
* single_quoted
"'" idle
:double_quoted String
* double_quoted
"#" maybe_extrapolation
"\"" idle
:maybe_extrapolation String
* double_quoted noeat
"{" extrapolation recolor=-2
:extrapolation Extrapolation
* extrapolation
"}" double_quoted
"\"" double_quoted noeat
:atom Atom
* idle noeat
"a-zA-Z0-9" atom
:is_edoc Comment
* is_edoc
"\"" string_dq_1
"\n" idle
:string_dq_1 Comment
* is_edoc
"\"" string_dq_2
:string_dq_2 Comment
* is_edoc
"\"" docstr_dq
:docstr_dq Comment
* docstr_dq
"\"" docstr_dq_1
:docstr_dq_1 Comment
* docstr_dq
"\"" docstr_dq_2
:docstr_dq_2 Comment
* docstr_dq
"\"" idle
:brace Brace
* idle noeat
:brack Brack
* idle noeat
:maybe_pipe Idle
* idle
">" pipe recolor=-2
:pipe Keyword
* idle noeat
:maybe_opt Idle
* idle
"\\" opt recolor=-2
:opt Keyword
* idle noeat
:decimal Int
* idle noeat
"0-9_" decimal
"." float
:float Int
* idle noeat
"0-9" float
:underscore Underscore
* idle noeat
"a-zA-Z0-9?_" underscore
:ident Idle
* ident1 noeat buffer mark
:ident1 Idle
* idle noeat strings
"def" start_def
"defp" start_def
"defmodule" start_mod_def
"defprotocol" start_def
"defmacro" start_def
"defmacrop" start_def
"defdelegate" start_def
"defexception" start_def
"defstruct" start_def
"defimpl" start_def
"defcallback" start_def
"import" start_mod_def
"require" start_mod_def
"use" start_mod_def
"alias" start_mod_def
"end" kw
"do" kw
"if" kw
"else" kw
"unless" kw
"case" kw
"cond" kw
"true" kw
"false" kw
"Agent" bif
"Application" bif
"Atom" bif
"Base" bif
"Behaviour" bif
"Bitwise" bif
"Builtin" bif
"Code" bif
"Dict" bif
"EEx" bif
"Elixir" bif
"Enum" bif
"ExUnit" bif
"Exception" bif
"File" bif
"File.Stat" bif
"File.Stream" bif
"Float" bif
"Function" bif
"GenEvent" bif
"GenServer" bif
"GenTCP" bif
"HashDict" bif
"HashSet" bif
"IO" bif
"IO.ANSI" bif
"IO.Stream" bif
"Inspect.Algebra" bif
"Inspect.Opts" bif
"Integer" bif
"Kernel" bif
"Kernel.ParallelCompiler" bif
"Kernel.ParallelRequire" bif
"Kernel.SpecialForms" bif
"Kernel.Typespec" bif
"Keyword" bif
"List" bif
"Macro" bif
"Macro.Env" bif
"Map" bif
"Math" bif
"Module" bif
"Node" bif
"OptionParser" bif
"OrdDict" bif
"Path" bif
"Port" bif
"Process" bif
"Protocol" bif
"Range" bif
"Record" bif
"Regex" bif
"Set" bif
"Stream" bif
"String" bif
"StringIO" bif
"Supervisor" bif
"Supervisor.Spec" bif
"System" bif
"Task" bif
"Task.Supervisor" bif
"Tuple" bif
"URI" bif
"UnboundMethod" bif
"Version" bif
done
"a-zA-Z_0-9" ident1
":" attr noeat recolormark
:attr Attribute
* idle
:kw Keyword
* idle noeat
:bif Bif
* idle noeat
:start_def Keyword
* def
:def Def
* def
" (" idle recolor=-1
:start_mod_def Keyword
* moddef
:moddef ModDef
* moddef
" " idle recolor=-1
"\n" idle

15
ftyperc
View File

@ -1009,3 +1009,18 @@
-smartbacks -smartbacks
-c_comment -c_comment
-cpp_comment -cpp_comment
Elixir
*.ex
-autoindent
-syntax elixir
-pound_comment
-text_delimiters do=end
-linums
*.exs
-autoindent
-syntax elixir
-pound_comment
-text_delimiters do=end
-linums