Questions tagged [codelens]

CodeLens is a code editor enhancement of Microsoft Visual Studio 2013 Ultimate and 2015 Professional and up to show code changes, references, bugs, work items and code review requests.

CodeLens is a code editor enhancement of Microsoft Visual Studio 2013 Ultimate and 2015 Professional and up to show code changes, references, bugs, work items and code review requests. For more info refer: https://learn.microsoft.com/en-us/visualstudio/ide/find-code-changes-and-other-history-with-codelens

114 questions
2
votes
2 answers

How to disable show reference checkbox of codeLens option in visual studio 2013

I am trying to disable show reference in visual studio 2013. Tools-> option -> Text Editor -> All Language -> over here show reference checkbox is disable so I am not able to unchecked that option. please let me know how to enable this option . I…
Sunil Aher
  • 747
  • 3
  • 14
  • 34
2
votes
1 answer

CodeLens wrong/incomplete after moving file in TFS

We just moved one solution in TFS to another folder and now all the CodeLens are only showing one change (the move) and only "the mover" as the only person having changed the method (even if he did not actually touch the method). In the "Source…
Christoph Fink
  • 22,727
  • 9
  • 68
  • 113
2
votes
2 answers

Is it possible to write completely maintainable code?

I downloaded the "Microsoft CodeLens Code Health Indicator" VS 2013 extension ( http://visualstudiogallery.msdn.microsoft.com/f85a7ab9-b4c2-436c-a6e5-0f06e0bac16d) ...and opened a simple utility. The score of my methods ran from a low of 52 to a…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
1
vote
2 answers

Visual Studio Code codelens doesn't work on variables

I'm developing an game with c# unity and I'm using Visual Studio Code as IDE. However the codelens doesn't work on variables - only properties, classes.. etc at some point as shown in the screenshot: enter image description here I'd appreciate it if…
hyunbae
  • 11
  • 1
1
vote
0 answers

How to enable codelens for merging

I recently got a new device and have been playing around with git and tried to merge two branches, but vscode's codelens doesn't seem to show the usual "accept current change accept incoming change" menu. Instead, it just puts it in raw text - how…
BenjaminLi
  • 63
  • 6
1
vote
1 answer

How to link Codelens provider with reference provider for VS Code API

I already have an existing reference provider for the custom language. It works, it opens a references using go to references and go to peek: Go to references Although, I am not using these commands editor.action.peekLocations or…
1
vote
0 answers

VSCode codeLens Accept Current Change only deletes last conflict marker

I'm using vscode as the merge tool on ubuntu 20.04. While doing a rebase, I do see the codelens toolbar of which change to accept - but then sometimes instead of accepting the changes it only removes the last conflict marker. <<< HEAD (Current…
Anyuta
  • 21
  • 5
1
vote
1 answer

How to hide CodeLens reference counts in VS2019?

Visual Studio 2019 has a feature where it inserts lines showing you "reference counts": How do i turn them off? What have you tried? Right click the reference count line Click CodeLens Options The CodeLens options dialog appears Note that…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
1
vote
1 answer

How can I add “Toggle On/Off Code Lens” as a quick command button on Visual Studio?

I would like to have a quick command button displayed on my Menu bar to turn on/off the Code Lens. I understand there is a keyboard shortcut available for it: The EditorContextMenus.CodeLens.CodeLensOptions command for keyboard shortcut, but I…
rc76
  • 11
  • 1
1
vote
1 answer

Disable CodeLens in specific files

How to disable CodeLens in specific file(s) in Visual Studio 2019, like tool-generated one? Our project is using some extra long tool-generated code (about 400k lines...Well, lets say its the burden of the past and we cant get rid of it, its doing…
Jan 'splite' K.
  • 1,667
  • 2
  • 27
  • 34
1
vote
1 answer

How to find all particular type object initilializations in code

When refactoring a good piece of code I ran into the problem: I have to find and check all places where new instances of a particular type of object are created. Whether it is: methods, constructors, 'new' keyword. I can't do it without checking all…
JohnIdlewood
  • 356
  • 3
  • 12
1
vote
1 answer

How I can filter lens inside resolveCodeLens?

I am trying to split CodeLensProvider implementation in two parts. First part is implementation of provideCodeLenses which returns array of unresolved CodeLens. And the second part is implementation of resolveCodeLens. So I want to ignore some kind…
Ky6uk
  • 1,067
  • 3
  • 16
  • 26
1
vote
0 answers

Visual Studio : Disable CodeLens lync (Skype Enterprise) integration?

The enterprise I work for recently started using Skype Enterprise. Our setup seems very problematic, we have two domains, two seperate email/mailbox and Lync/Skype Enterprise doesn't like it and goes into endless loops on some features (creating…
Carl Quirion
  • 765
  • 5
  • 25
1
vote
0 answers

Visual Studio 2017 Codelens not showing test connection when a method implements interface

I have an issue with codelens when a class implements an interface, the 1/1 passing is not showing. E.g. with this implementation: public interface IMyInterface { string GetString(); } public class MyClass : IMyInterface { public string…
h3li0s
  • 613
  • 9
  • 25
1
vote
0 answers

Custom event handlers show "0 references" in CodeLens

I created a custom UserControl in my WPF project that has some custom events. The events work with out any problem but there is a small issue with it. In my VS 2015 the control event handlers show "0 references" (CodeLens - this is a VS 2013-15…
A.G.
  • 304
  • 2
  • 11