angular / vscode-ng-language-service

Angular extension for Visual Studio Code
MIT License
775 stars 116 forks source link

References CodeLens for templates #162

Open listepo-alterpost opened 7 years ago

listepo-alterpost commented 7 years ago

Hi, can you add References CodeLens when properties or methods using in the templates?

webia1 commented 5 years ago

https://github.com/microsoft/vscode/issues/80794

kyliau commented 4 years ago

Possible duplicate: https://github.com/angular/vscode-ng-language-service/issues/29 What's the difference between "Find all references" and "References CodeLens"?

kyliau commented 4 years ago

Will track this in https://github.com/angular/vscode-ng-language-service/issues/29

angular-automatic-lock-bot[bot] commented 4 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

atscott commented 3 years ago

Re-opening since "find all references" is different from CodeLens. Note that the references CodeLens is provided by the built in typescript extension: https://github.com/microsoft/vscode/blob/d99c218e9b2da6935d467a7566a3de49c406ce90/extensions/typescript-language-features/src/languageFeatures/codeLens/referencesCodeLens.ts#L43-L52

We can't "edit" or add template references to those results, but would instead have to provide our own CodeLens for template references.

LucasLundJensen commented 3 years ago

Any updates on this?

micaminoff commented 3 years ago

I'm refactoring a huge project at the moment. Reliable reference counts would be a major help.

Harpush commented 2 years ago

Any news? Adding a # references in template sounds good to me

Harpush commented 1 year ago

@atscott it's been so many years? Can this please be implemented?

Dozorengel commented 12 months ago

As a workaround I use TypeLens right now

webia1 commented 11 months ago
Dear Guardians of this Code,
Who labor with each byte and node,
Seven years have passed us by,
Since this issue caught the eye.

Like a riddle with no end,
I inquire, my coding friend,
When might thee take a second glance,
And give this lingering quest a chance?

The whiskey's warmth has fueled my pen,
Inspiring me to ask again.

Yours, in lines of code and rhyme,
Awaiting your response in time.
joeskeen commented 6 months ago

@Dozorengel thanks for the tip about TypeLens! It took a couple minutes after enabling it (probably indexing my project), but now I see my reference from my template! image image

Dozorengel commented 6 months ago

@joeskeen yeap, I've been using references all the time since last year. Not all references are displayed, but that's fine enough.

joeskeen commented 6 months ago

Yeah, the main one that doesn't get picked up for me are all my @HostBinding()s. To change that, the Angular language service would have to report usage of the symbol somewhere. Maybe the @Component() decorator? 🤷

But overall, much better than what I had before!

Harpush commented 1 month ago

It will be 7 years tomorrow - any chance it will happen?