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

Extension causes "go to definition" to go to type definition #461

Closed
4 tasks done
kylemh opened this issue Jul 31, 2024 · 4 comments
Closed
4 tasks done

Extension causes "go to definition" to go to type definition #461

kylemh opened this issue Jul 31, 2024 · 4 comments
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on

Comments

@kylemh
Copy link

kylemh commented Jul 31, 2024

Initial checklist

Affected packages and versions

1.8.9 and styled-components@^5

Link to runnable example

No response

Steps to reproduce

  • Use Next.js starter
  • Install styled-components@^5
  • Install @types/styled-components`
  • Install MDX VS Code extension
  • Define some simple component and render it on app/page.tsx or src/app/page.tsx or pages/index.tsx or src/pages/index.tsx: a lá:
const BlueText = styled.p`
  color: blue;
`;
  • In VS Code, right-click on the "BlueText" part of <BlueText>Test</BlueText>
  • Click "Go To Definition"
  • Be taken to type definitions instead of your inline definition of BlueText

Somebody else saw this problem, too: microsoft/vscode#211725

Expected behavior

I should be taken to source definition, especially with "typescript.preferGoToSourceDefinition": true

Actual behavior

I am taken to type definition

Runtime

Node v18

Package manager

pnpm

OS

macOS

Build and bundle tools

Next.js

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jul 31, 2024
@remcohaszing
Copy link
Member

I’m unable to reproduce. I tried it with both 1.8.9 and 1.8.10. Does the problem still exist for you? If so, please provide a repo with a minimal reproduction.

@remcohaszing remcohaszing added the 🙉 open/needs-info This needs some more info label Sep 8, 2024
Copy link
Contributor

github-actions bot commented Sep 8, 2024

Hi! Thanks for taking the time to contribute! This has been marked by a maintainer as needing more info. It’s not clear yet whether this is an issue. Here are a couple tips:

  • Spend time framing the issue! The more time you put into it, the more we will
  • Often, maintainers respond with why for several back and forths; rubber duck debugging might help avoid that
  • Folks posting issues sometimes fall for xy problems: asking for a certain solution instead of raising the root problem

Thanks,
— bb

@kylemh
Copy link
Author

kylemh commented Sep 9, 2024

The problem existed until I removed the extension! It was happening on a work repo and - once I saw that comment in the TS repo - I attempted the minimum repro that I shared. It's a bit tough for me to share a perfect reproduction because I can't control the Node version of online versions of VS Code. If you did the steps with the correct Node version and told VS Code to use the workspace version of TS (as opposed to the editor version), then I've got no clue! If I re-add, I continue to get the same issue.

@kylemh kylemh closed this as completed Sep 9, 2024

This comment has been minimized.

@remcohaszing remcohaszing added 🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on and removed 🙉 open/needs-info This needs some more info 🤞 phase/open Post is being triaged manually labels Sep 12, 2024
@remcohaszing remcohaszing closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants