Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

New in Bitbucket Labs: Syntax highlighting on pull requests

Hello all 👋 It’s Dave from the Bitbucket Cloud product team. Today we’re excited to introduce a small but important improvement to code review: Syntax highlighting on pull requests. It’s one of our highest-voted feature requests, and you can enable it today in Bitbucket Labs.

Once you switch on the feature, pull request diffs will automatically include highlighted syntax for hundreds of the most common programming languages.

261be17f-0012-49ef-b993-df9c076814f3.png

Software developers spend many hours each week reviewing code, and highlighted syntax makes code that much more legible. The Bitbucket Cloud team has been dogfooding this feature for several weeks, and it’s made our code reviews noticeably smoother. We think your teams will appreciate it too.

How to activate this feature

To switch on syntax highlighting for your user account:

  1. Visit Labs in your Bitbucket settings

  2. Switch on the Enable syntax highlighting in diffs feature

 

d2ac6e77-a48c-4f0c-abd0-6d1879677ac8.png

Note: The syntax highlighting feature is disabled by default, so you’ll need to switch it on if you want to use it.

Known limitations

We’re leaving this feature in Bitbucket Labs for now while we work out a few known issues. Notably, this feature will likely conflict with third-party browser extensions that add functionality to the Bitbucket pull request page. If you experience problems after turning on this feature, try disabling those extensions.

Once we’ve ironed out known issues, we’ll roll this feature out to all users automatically. In the meantime, you can toggle the feature in Labs if you’d like to opt in or out at this time.

Tell us what you think

If you have feedback on this feature – or if you've found a bug – we'd love to hear from you. Head to the Bitbucket help menu > “Give feedback” to share your thoughts with us.

16 comments

Hyo March 22, 2023

Love it !!! It works well ! Very colorful and easy to watch Java project PR ! (no more gray gray things like in the past) Also My co-workers are satisfied with it. Thanks !

Aron Gombas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2023

Very useful, but the color scheme is bizarre.

Why would someone color method and class names to red, a color traditionally associated with "error"?  Red method names, e.g., are also not looking good on removed lines, either...

Like # people like this
Victor Ripplinger March 23, 2023

This is a massive improvement for PRs for sure!

How can the .cpp files be colored but not even the .h files though? :(

Like # people like this
Dave Parrish _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 23, 2023

@Victor Ripplinger Glad to hear it! And thanks for pointing out `.h` files - it was an oversight and we can easily add support for those.

Dave Parrish _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 23, 2023

Hey @Aron Gombas, long time no talk! Thanks for the thoughts about the color scheme. We may make some tweaks based on the feedback we hear, so please let me know if there's anything else that feels off.

Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 23, 2023

@Dave Parrish _Atlassian_ If I can ask for more, then these would be useful as well:

  1. configurable "context" for diffs (no of lines before and after changes)
  2. use pale colors on a dark background to make it easy for the eye
    1. but colors are always a subject for debate, so the best would be a selectable palette (like here, for example)
Victor Ripplinger March 24, 2023

@Dave Parrish _Atlassian_Thanks, that's reassuring. :)

Then I'll also take the opportunity to request support for .qml files.

Rickard Natt och Dag March 28, 2023

This is a great feature! I would like to request adding support for `.vue` files too.

Like Nathaniel Blackburn likes this
Dave Parrish _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 28, 2023

Just a quick update we've added support for `.h` and `.qml` file formats. `.vue` is in the works. :)

Like # people like this
Anuradha Kumari April 4, 2023

Pricing is involved or we can enable this feature for free?

Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2023

@Anuradha Kumari It is free of charge (as far as I can tell).

Dave Parrish _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 22, 2023

Another update - we've just added support for highlighting `.tf` and `.vue` file formats.

Ayush Bansal September 27, 2023

Can we also add support for `.inl` to map to `.h` format? Same goes for `.hpp`.

Also, can we expect a future release where we can define our custom mappings?

Like Chris Redfield likes this
Jared Smith September 28, 2023

Thanks for this! I would like to request `.elm` support. 

Like Chris Redfield likes this
Samuel Winter
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 12, 2023

When is this coming to self-hosted enterprise bitbucket?

Yuta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 4, 2024

.pas file isn't supported as well

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events