I cannot check the imported modules code for some reason. Go to definition doesn't work or simply jumps to index.d.ts instead.

|Extension|Author|Version|
|---|---|---|
|EditorConfig|EditorConfig|0.3.4|
|code-settings-sync|Shan|2.4.3|
|jsx|TwentyChung|0.0.1|
|html-css-class-completion|Zignd|1.0.3|
|html-snippets|abusaidm|0.0.18|
|project-manager|alefragnani|0.13.1|
|npm-intellisense|christian-kohler|1.2.1|
|vscode-eslint|dbaeumer|1.2.2|
|githistory|donjayamanne|0.1.5|
|vscode-babel-coloring|dzannotti|0.0.4|
|vscode-npm-script|eg2|0.1.8|
|php-intellisense|felixfbecker|0.0.12|
|code-runner|formulahendry|0.6.7|
|rest-client|humao|0.12.1|
|docthis|joelday|0.3.10|
|better-merge|pprice|0.5.1|
|vscode-icons|robertohuertasm|7.1.2|
|sass-indented|robinbentley|1.3.0|
|annotator|ryu1kn|0.10.1|
Can you please provide some example code or an example project that shows this problem so that we can investigate this.
```import React from 'react';
import { Link } from 'react-router';
export default (props) => {
return (
Clicking CMD+ left click on 'React' for example guide us to index.d.ts.
In WebStorm on the other hand we're sent to source code of react.js.
This is currently as designed. Our JavaScript language support is powered by TypeScript and the way that TypeScript is able to provide rich support for JavaScript libraries is by using *.d.ts files. That's where it picks up the type info, not from the source itself. If a library is written in TypeScript, then we can jump to the implementations but not if it is written in JavaScript.
I believe that TypeScript is tracking the ability to jump to an JavaScript implementation here: https://github.com/Microsoft/TypeScript/issues/6209
I'm sufficiently frustrated by this issue to tell you why: "Go to definition" is such a basic feature and you guys won't just figure out a way to get it done. Instead, you're pointing us to a 1.5 year old TypeScript issue that got removed from their road map as soon as the TypeScript implementation was finished.
This has got to be one of the issues that keeps many people from using vscode because it makes me think that you don't care about the actual work that I need to do with this tool.
IMO, you guys should be on fire for this issue. At the very least, hack together a plugin to cover the most basic scenario (navigating to the node_modules sub-folder that contains the package name under my cursor in an import statement). So, to illustrate:
import React from 'react'; // [B]
class Thing extends React.Component { // [A]
render() {
return <div>Thing</div>;
}
}
[A] in the example above, with my cursor on React.Component...pressing F12 would bring me to the import statement (the line marked [B]). This is normal vscode behavior and it works.[B], with my cursor on 'react'...pressing F12 should at least navigate the Explorer sidebar to the proper node_modules/react folder.If that's all you can do for now - it's better than nothing.
See also: #25197
I have to agree, I'm trying to switch to vscode as its much faster than webstorm, but the fact that I can't navigate code removes 90% of the reason I use an editor. I can't even jump to declarations that are in the same file sometimes and there's no explanation given.
Version 1.11.2
OS: OSX
The code for the project I'm working on unfortunately cannot be shared.
I'm also wondering why this issue was closed. "Go to definition" does not work even when everything is in Typescript. It's quite frankly bizarre. This is one of _the_ basic features every IDE should have.
i need this feature
I need this too. For me it doesn't even work within the same file, and as others have said here, it's a very basic, essential feature in an editor. I've been impressed with VS Code, but this is a deal-breaker, and it's also discouraging to see this issue closed, leading me to think the maintainers of the project just don't care what people need.
I am working a project with no TypeScript, and adding this to settings solves for me:
"typescript.disableAutomaticTypeAcquisition": true
(it still goes to d.ts files when they exist in a node_module, but otherwise it takes me to the .js definition as desired, instead of an auto-generated d.ts file)
I was initially very happy with vscode, and still somewhat are, but this is definitely the most frustrating issue I've come across. I need this fixed, _please_
me too, may be there is a config to define how is go to defined work
Most helpful comment
I have to agree, I'm trying to switch to vscode as its much faster than webstorm, but the fact that I can't navigate code removes 90% of the reason I use an editor. I can't even jump to declarations that are in the same file sometimes and there's no explanation given.
Version
1.11.2OS: OSX
The code for the project I'm working on unfortunately cannot be shared.