No, I'm afraid there's no easy way to do that. We use Pygments for syntax highlighting and so while that covers a lot of languages, it is not easy to extend it to custom DSLs.
Depending on how badly you want this, you could write a Connect Add-On for it. Connect Add-Ons are iframes that replace parts of Bitbucket's UI that you host and control. Using the Bitbucket API to pull down the contents of a file, you can then render it any way you like.
There are examples of how to do that:
one year later, how's the situation on this? i would like to install a custom pygments highlighter for my repository; but i don't want to go through the trouble of programming an extra site extension. i'm completely open to submitting my highlighter to the atlassian repos though.
Thank you so much for the answers! I will have to wait and see how bad I want it One final question for clarification.
Does the solution mean that each user has to install the add-on or it will be installed for the repository and everyone accessing it will see it?
The file-viewer plugin point can be used on both "account" and "personal" add-ons. Add-ons of the former type can be installed on the account that owns the repo and then it'll be visible to anyone viewing files in that repo. Add-ons of the latter type are installed on your own personal account and sort of follow you around; they apply only to pages you visit.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs