Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unneeded reference to css class #1989

Closed
rchl opened this issue Oct 11, 2022 · 5 comments
Closed

Unneeded reference to css class #1989

rchl opened this issue Oct 11, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@rchl
Copy link
Collaborator

rchl commented Oct 11, 2022

Note how the code lens for the .some-class includes 2 references but there is only one use of .some-class in the file:

Screenshot 2022-10-11 at 13 24 11

I believe the references lens should not include the class definition itself.

@rchl
Copy link
Collaborator Author

rchl commented Oct 11, 2022

Repo that includes this simple index.vue file: rchl/volar-vue2-test

@rchl rchl changed the title Unneeded references to css class Unneeded reference to css class Oct 11, 2022
@johnsoncodehk johnsoncodehk added the bug Something isn't working label Oct 11, 2022
@rchl
Copy link
Collaborator Author

rchl commented Oct 13, 2022

I've tested it only now and while the code lens shows only one reference now, the returned list on clicking still includes both.

@johnsoncodehk
Copy link
Member

This is intentional because I think its results should be consistent with right click -> "Fine References".

@rchl
Copy link
Collaborator Author

rchl commented Oct 13, 2022

But it's not how it works in plain JS/TS, for example.

If you define a function and show references for it then it won't show the function definition itself.

@johnsoncodehk
Copy link
Member

I see, will make it consistent with plain JS/TS, thanks for bringing this up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants