Here's how to change Codelens Indicator style in Visual Studio


Code lens is a feature, first introduced in Visual Studio 2013, which helps you to understand important aspects about your code without leaving your favorite editor. It tells us the code changes in a fantastic way. In this small tips & tricks post on Visual Studio, we will learn how to change the font and color settings of Code Lens. - Article authored by Kunal Chowdhury on .

Code lens is a feature, first introduced in Visual Studio 2013, which helps you to understand important aspects about your code without leaving your favorite editor. It tells us the code changes in a fantastic way, within the code editor.

 

In this small tips & tricks post on Visual Studio, we will learn how to change the font and color settings of Code Lens.

 

How to change Codelens Indicator style in Visual Studio (www.kunal-chowdhury.com)

 

Using 'Code Lens', you will have a deep focus on your code. It will tell you about reference history, changes in your code, author of the code, unit test status, bugs/tasks associated with an item and commit/change history in a trackable manner.

 

You can change the style of the Code Lens information from Visual Studio 'Options', that includes fonts, size, color etc. In general, the default font set to it is 'Calibri' of Size: 8 and decorated in light gray. When you hover on it, the color changes to bluish as shown below:

 

Codelens Indicator style in Visual Studio (www.kunal-chowdhury.com)

 

To change the font, color and size of Code Lens, open the Visual Studio 'Options' from IDE menu 'Tools | Option' and then navigate to 'Fonts and Colors'. The following dialog will popup in the screen. To change the code lens formatting, select 'CodeLens' from the dropdown labeled 'Show settings for'.

 

How to change Codelens Indicator style in Visual Studio (www.kunal-chowdhury.com)

 

You can set the Font family and the size. You can also set it's color. There are five categories of color indicators available: Indicator Text, Indicator Text (Hovered), Indicator Text (Selected), Indicator Text (Disabled) and Indicator Separator.

 

Choose the one that you want to change and from the 'Item foreground' dropdown, select the appropriate color. You can also click the 'Custom...' button to select a custom color, not part of the dropdown list.

 

How to change Codelens Indicator style in Visual Studio (www.kunal-chowdhury.com)

 

Once done, click 'OK' button to apply the changes. It will apply immediately, but in few case you may have to restart Visual Studio for the settings to take effect.

 

Codelens Indicator style in Visual Studio (www.kunal-chowdhury.com)

 

This is applicable to both Visual Studio 2013, Visual Studio 2015 and Visual Studio 2017. Was the post helpful? Do let us know below in the comment section.

 

 

Have a question? Or, a comment? Let's Discuss it below...

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.