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

TypeScript: References include definition, which breaks "editor.gotoLocation.multipleReferences": "goto" usage #160637

Closed
talks2much opened this issue Sep 11, 2022 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@talks2much
Copy link

talks2much commented Sep 11, 2022

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: insider
  • OS Version: Windows

Steps to Reproduce:

  1. Set "editor.gotoLocation.multipleReferences": "goto" setting
  2. Create untitled TypeScript file:
const test = () => {}
test()
test()
  1. Ctrl+clicking test on first line or execute Go to References command

Expected: focus on line 2
Actual: stays on the same position

References provide isn't being called on Go to References command, but specifically TypeScript extension still includes definition into references. I hope you take this issue as it is really annoying, there is absolutely no need to do this + I can call definitions manually when I want.

@talks2much
Copy link
Author

talks2much commented Sep 11, 2022

I was just curios why its happening only with TypeScript extension and it seems that:

if (!options.includeDeclaration && ref.isDefinition) {

const result = await provider.provideReferences(model, position, { includeDeclaration: true }, token);

Its hardcoded here, there is no way to disable it even not via API,

And finally this change was also not clear for me

c4d6481#diff-d897e7805588a8bb44eb7cb12ae2d505658e8c29b8c4bd7625233b6dedbb90bb

@jrieken jrieken added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 13, 2022
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2022
@talks2much
Copy link
Author

I'm sorry to mention you here @robeady but it seems to be closed in favor of your #114673 did you a find a solution since then? We're personally using extension to workaround that. 😞

@robeady
Copy link

robeady commented Sep 13, 2022

no, I didn't, but I don't know if the issue I reported has been fixed since I last checked in on it

@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

5 participants