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

[TSX] 'Go to definition' also opens the type #5770

Closed
1 task done
stickyburn opened this issue Oct 23, 2022 · 2 comments
Closed
1 task done

[TSX] 'Go to definition' also opens the type #5770

stickyburn opened this issue Oct 23, 2022 · 2 comments
Assignees
Labels
bug [core label] language An umbrella label for all programming languages syntax behaviors typescript TypeScript programming language support

Comments

@stickyburn
Copy link

stickyburn commented Oct 23, 2022

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Probably not a bug but a current feature 😅 , but opening a component's definition opens two files

  • implementation of the component
  • typing of the component

Highlight component reference -> Go to definition -> If typings are generated using compiler, Zed will open one index.ts and the actual component definition.

Expected behavior

I think it's better to open only the definition of the component, instead of it's typings as well. Maybe this is related to my particular project since we do some typescript magic for micro-fronts.

Environment

Zed 0.61.0 – /Applications/Zed.app
macOS 12.6
architecture arm64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue

No response

@stickyburn stickyburn added bug [core label] triage Maintainer needs to classify the issue labels Oct 23, 2022
@JosephTLyons JosephTLyons added typescript TypeScript programming language support language An umbrella label for all programming languages syntax behaviors and removed triage Maintainer needs to classify the issue labels Oct 24, 2022
@JosephTLyons
Copy link
Collaborator

JosephTLyons commented Dec 14, 2022

For Zed Devs: To reproduce, in the Zed.dev project, search for useSWR<WaitlistSummary> and then run go to definition on useSWR.

@Kethku Kethku self-assigned this Jan 20, 2023
@Kethku
Copy link
Contributor

Kethku commented Jan 20, 2023

Should be fixed in next release.

The solution here was to use a multibuffer if multiple definitions are returned from a language server. Then if you want to edit from there, you can jump to that file directly.

@Kethku Kethku closed this as completed Jan 20, 2023
This was referenced Jan 21, 2023
@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] language An umbrella label for all programming languages syntax behaviors typescript TypeScript programming language support
Projects
None yet
Development

No branches or pull requests

3 participants