Thursday, February 4, 2016

How to get Elixir syntax highlighting in github markdown files

Very recently I've started to try out the elixir programming language. As I go about exploring the language through different experiments, I was thinking of making notes of learnings along the way in markdown files. I knew how ruby syntax highlighting works(please see the screenshot below) but didn't know the exact way to do this in elixir.

I've subscribed to a beginners channel in the elixir-lang slack group(you can get your invite here) . Karmen Blake(kblake on the slack group) and Andrea Rossi(lucidstack on the slack group) from that group were quick to help me out with the right syntax for highlighting elixir code in a markdown file. Here's how you can get elixir syntax highlighting in your markdown file -

Here's a github gist of how it looks. You can look at the raw gist to see the exact syntax that you may need to use. Below is a screenshot of how the highlighted syntax looks in a markdown file.

I would like to thank Karmen Blake and Andrea Rossi for helping out from the elixir community :). I think you should definitely hangout in the beginners channel of their slack group if you're just getting started with elixir.


P.S: It's been a while since I've written my last post. I had been held up with a few things in the past but I hope to write more often going forward. Thanks for your patience.

No comments:

Post a Comment