-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Add navigation path for going to JS node_modules definitions instead of .d.ts declarations #37777
Comments
I'd like to add that sometimes I do like to browse TS definition files when knowing what types I have to deal with during development; but I do agree I'd like to browse through the code during debugging. |
Moving this feedback upstream |
The providers for "Go to Definition", "Go To Type Definition", and "Go To Implementation" currently do the same thing. It's visible on this screencast where I call them in turn: https://asciinema.org/a/619AvvIQjd3zG7IV5MoLafVec I'd expect that only "Go to Type Definition" goes to d.ts files. Maybe "Go To Definition" and for sure "Go to Implementation" should go to JS files if they are the only ones with implementation. This is very serious issue because it makes it really hard to debug code of dependencies. |
Any way to get this bumped to a higher priority? I go a little bit more insane every day over this 🤪 Also, the issues label is wrong. This has got to be considered a bug? Also, not sure how this is a TypeScript issue, seems more like a VSCode issue to me. |
It is typescript issue and it even has failing test: #39426 |
this issue affects a lot of OpenSource contributors when they try to troubleshoot issues in OpenSource repositories. I will try generating ctags to navigate the node modules https://github.com/jb55/typescript-ctags |
Definitely waiting for this! |
Is this issue still relevant? Go to Source Definition available in VS Code from early June |
UPDATE: goToSourceDefinition was also added to neoclide/coc-tsserver#384. The issue was also solved with neovim. Thanks 🙏 |
Now that "Go To Source Definition" can be set as the preferred mode for "Go To Definition" (see #49003 (comment)) I think this can be closed. |
using the vim plugin coc-tsserver when I navigate to useRef, the file is still minified and unreadable. Screen.Recording.2024-07-31.at.1.41.18.PM.mov |
Issue Type: Bug
When I "go to definition" of module in a JavaScript project it jumps to the TypeScript types file, if available, not the actual definition. If the TypeScript types are not available it will work as expected.
In the past, VSCode maintainers have commented:
and
and
microsoft/vscode#68782 (comment)
but that's is so clearly just flat-out wrong. There is a separate command for navigating to TypeScript types in the Right-Click context menu: "Go to Type Definition", it appears directly beneath "Go to Definition".
To reiterate: if the TypeScript file is removed everything works as expected.
People don't want to browse TypeScript definition files when stepping through source definitions. Abstractions are leaky. We need to find out why.
VS Code version: Code 1.43.2 (0ba0ca52957102ca3527cf479571617f0de6ed50, 2020-03-24T07:52:11.516Z)
OS version: Linux x64 5.0.0-16-generic
The text was updated successfully, but these errors were encountered: