Geany supports Ruby but not Crystal https://github.com/crystal-lang/crystal The syntax is very similar to Ruby so is there any way of adding the same syntax highlight on Ruby to Crystal in Geany?
You could either simply load Crystal files as if they were Ruby (modifying only [filetype_extensions.conf](https://www.geany.org/manual/#filetype-extensions)), or add a new [custom filetype](https://www.geany.org/manual/#custom-filetypes) based on Ruby.
Closed #1714.
Tried to do it, didn't go well.
Reopened #1714.
@Beyarz what do you mean, you didn't succeed at creating a custom filetype, or the support wasn't good enough? What do you think of the [filetype I just added to the Wiki](https://wiki.geany.org/config/crystal)? does it work well enough? If you have any improvements for it, feel free, I never used Crystal so I created it only out of the info I could gather easily.
Followed your exact steps, still no success. I think I'll use another IDE for crystal and Geany for all the usual stuff.
@Beyarz what does "no success" mean here? Do you have a "Crystal" entry somewhere under the *Document → Set Filetype* menu item (normally under *Scripting Languages*, but possibly somewhere else if it's not working properly for you)? If so, what part isn't working? Auto-detecting `.cr` files? Something not working when it's selected?
The syntax highlight doesn't appear nor does it seem like Geany is detecting Crystal, but it's really hard to tell what is wrong because I followed your exact steps. And yes, I saw the Crystal entry.
Well, the filetype appears in the status bar so you can tell what Geany is using.
Also, if you set the filetype manually `Menu->Document->Set Filetype->Scripting Languages->Crystal` does highlighting appear?
No it does not
What is required to add official support for Crystal lang?
Somebody has to write the highlighting lexer in the [scintilla](scintilla.org) project and then the integration into Geany.
@Beyarz it would probably be easier to figure out why @b4n's custom filetype he put on the wiki doesn't work for you. If some people tested it and find it useful, it could be added to Geany.
I think the issue has been solved, the syntax highlighting is perfectly matching Rubys. I can also finally view the Crystal as an option in the menu bar, Geany is also autodetecting Crystals extension.
I solved the issue by fully removing Geany from my system and every trace I could find of it and then installed it again through Homebrew.
Closed #1714.
github-comments@lists.geany.org