This is an old revision of the document!


Crystal filetype

Experimental custom filetype for the Crystal language.

~/.config/geany/filedefs/filetypes.Crystal.conf
[styling=Ruby]
 
[keywords]
primary=abstract alias as as? asm begin break case class def do else elsif end ensure enum extend false for fun if in include instance_sizeof is_a? lib macro module next nil nil? of out pointerof private protected require rescue return select self sizeof struct super then true type typeof uninitialized union unless until when while with yield
identifiers=__DIR__ __FILE__ __LINE__ __END_LINE__
 
[lexer_properties=Ruby]
 
[settings=Ruby]
lexer_filetype=Ruby
tag_parser=Ruby
extension=cr
 
[build-menu]
FT_00_LB=_Build
FT_00_CM=crystal build "%f"
FT_00_WD=
EX_00_LB=_Run
EX_00_CM=crystal run "%f"
EX_00_WD=
EX_01_LB=_Execute
EX_01_CM="./%e"
EX_01_WD=

And alter your filetype_extensions.conf to add the new Crystal filetype.

~/.config/geany/filetype_extensions.conf
[Extensions]
...
Crystal=*.cr;
...
 
[Groups]
...
Script=Crystal;
...
Print/export