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

Go to Definition and Go to Implementation Does not Work As Expected #30023

Closed
carpet92 opened this issue Jul 2, 2017 · 2 comments
Closed

Go to Definition and Go to Implementation Does not Work As Expected #30023

carpet92 opened this issue Jul 2, 2017 · 2 comments
Assignees
Labels
javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@carpet92
Copy link

carpet92 commented Jul 2, 2017

  • VSCode Version: 1.13.1
  • OS Version: Windows 10 Version 1703 Build 15063.413
  • Node.js Version: 8.1.3

Steps to Reproduce:

  1. npm init
  2. npm install --save bcrypt-nodejs
  3. use following code snippet what I use in recorded gifs:
var bcrypt = require('bcrypt-nodejs')

UserSchema.pre('save', function(next) {
	var user = this
	if (!user.isModified('password')) {
		return next()
	}
	bcrypt.genSalt(10, function(err, salt) {
		if (err) {
			return next(err)
		}
		bcrypt.hash(user.password, salt, null, function(err, hash) {
			if (err) {
				return next(err)
			}
			user.password = hash
			next()
		})
	})
})

Reproduces without extensions: Yes

Issue: go to definition and go to implementation redirect me to d.ts files, not to implementation of method or function.

Gif VSCode (with issue demo):

sublime-go-to-def gif

Gif as expected (sublime as example):

sublime-go-to-def gif

This issue not present within the project i.e. with functions and methods what I Implemented myself. Simple example:

vscode-issue-go-to-def gif

I also find this issue: #19672 but it's closed for some reason. It's strange for me because I think "Go to Definition" and "Go to Implementation" is basic/must have feature in all IDEs.

Other related issues:

#25197
microsoft/TypeScript#9413
#8244

My VSCode config:

// Place your settings in this file to overwrite the default settings
{
    "editor.fontSize": 17,
    "editor.fontFamily": "Hack",
    "editor.fontWeight": "100",
    "editor.tabSize": 4,
    "editor.cursorStyle": "line",
    "git.enabled": true,
    "explorer.openEditors.visible": 9,
    "explorer.enableDragAndDrop": true,
    "files.encoding": "utf8",
    "files.eol": "\r\n",
    "files.insertFinalNewline": true,
    "files.autoSave": "off",
    "window.openFilesInNewWindow": "default",
    "editor.renderWhitespace": "none",
    "window.zoomLevel": 0,
    "workbench.welcome.enabled": true,
    "editor.lineHeight": 24,
    "editor.fontLigatures": true,
    "terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe",
    "workbench.colorTheme": "Material Theme",
    "workbench.iconTheme": "eq-material-theme-icons",
    "editor.minimap.enabled": true,
    "editor.dragAndDrop": true,
    "editor.minimap.renderCharacters": false,
    "editor.cursorBlinking": "blink",
    "workbench.activityBar.visible": true,
    "workbench.statusBar.visible": true,
    "editor.mouseWheelZoom": false,
    "editor.renderIndentGuides": true,
    "editor.renderLineHighlight": "all",
    "editor.matchBrackets": false,
    "diffEditor.renderSideBySide": true,
    "editor.multiCursorModifier": "ctrlCmd",
    "extensions.autoUpdate": false,
    "editor.quickSuggestions": {
        "other": true,
        "comments": false,
        "strings": false
    },
    "subtleBrackets.disableNative": true,
    "subtleBrackets.parse": true,
    "subtleBrackets.styles": {
        "global": {
            "borderWidth": "1px",
            "borderStyle": "none none solid none",
            "borderColor": "#FFCC00"
        }
    },
    "editor.find.seedSearchStringFromSelection": true,
    "editor.find.autoFindInSelection": false,
    "editor.selectionHighlight": true,
    "editor.occurrencesHighlight": true
}

Installed Extensions:

Subtle Match Brackets v.2.0.0
Material Theme v.1.0.0
Beautify v.1.1.1

@vscodebot vscodebot bot added the editor label Jul 2, 2017
@mjbvz mjbvz added javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Jul 3, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Jul 3, 2017

Yes, we currently only support jumping to *.d.ts files for external libraries. We are tracking support for jumping to the implementation itself with microsoft/TypeScript#6209

@mjbvz mjbvz closed this as completed Jul 3, 2017
@carpet92
Copy link
Author

carpet92 commented Jul 4, 2017

@mjbvz thanks. In this comment microsoft/TypeScript#6209 (comment) I found that it's works with "typescript.disableAutomaticTypeAcquisition": true option in settings. But when I use "Go to Implementation" I have a message: "No implementation found for "hash""

Gif:

050902401 gif

That's works with "Go to Definition" but it's not done solution for this issue, right?

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants