With the new beta feature of "New Source Browser Experience" enabled, files with .scala aren't syntax highlighted. They are being displayed in plain text.
Adding this "?spa=0&fileviewer=file-view-default" to the end of the URL will then show the file as highlighted.
Source Browser enabled
Source Browser Disabled
Workaround : To disable the New Source Browser Experience feature
- Navigate to Bitbucket Settings and click Labs
- Look for the feature "New source browser experience"
- Disable the feature
- Browser your file once again and the code should be syntax highlighted.