Skip to content

crystal-lang-tools/geany-crystal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

geany-crystal

Crystal support for the Geany editor.

See also the Crystal page of the Geany Wiki.

Installation

  • Copy the filetype

cp filetypes.Crystal.conf ~/.config/geany/filedefs

  • In the menu Tools > Configuration Files > filetype_extensions.conf
    • In [Extensions], add Crystal=*.cr;*.ecr;
    • In [Groups] then Programming=, add Crystal; to the line

Shortcuts

  • F5: Run
  • F8: Build
  • F9: Format

Don't forget to reload after formatting (Ctrl + R by default).

Language issues

Crystal isn't supported officially by Geany, so another close language has to be chosen instead. We have the choice of either Ruby or CoffeeScript, here are their pros/cons. You can switch from one to another by modifying ~/.config/geany/filedefs/filetypes.Crystal.conf.

CoffeeScript (default)

Configuration: [styling=Coffeescript] and lexer_filetype=CoffeeScript

  • structs and enums can be collapsed
  • heredocs are not highlighted (because JavaScript doesn't)
  • macros syntax are OK
  • methods and symbols aren't highlighted
  • blue color for common methods and related keywords

Ruby

Configuration: [styling=Ruby] and lexer_filetype=Ruby

  • supports heredocs
  • macro syntax not well supported, and usually mess up the rest of the file
  • struct can't be collapsed
  • standard and custom types are highlighted the same

See the Geany Wiki for more information about this configuration.

Contributors

  • @j8r Julien Reichardt - creator, maintainer

See all contributors

Releases

No releases published

Packages

No packages published