Is there anyway to use 'go to definition' find one function definition in other file? Two files are in the same folder/own the same parent folder.
I know the html holds all .js files, but I can't find any way in Google.
Go to Definition# Tip: You can jump to the definition with Ctrl+Click or open the definition to the side with Ctrl+Alt+Click.
Place your cursor on the step in your feature file. Right-click and select Go To Step Definition from the menu (F12). The file containing the binding is opened at the appropriate step definition method.
As one option, we can right-click on the source file and choose "Copy" and then right-click on the destination project and choose "Paste". The keyboard shortcuts Ctrl+C and Ctrl+V also work as long as you have the correct items selected in the Solution Explorer.
You must enable "TypeScript and JavaScript Language Features" extension in VS Code. It could be disabled by ESLint extension.
You need to create a jsconfig.json
file at the root of your project.
{
"compilerOptions": {
"target": "ES6"
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}
This file tells VS Code to treat all *.js
files in the workspace as part of the same project. However it will not enable intellisense between javascript in <script>
blocks and regular js files.
If this is still not working, try enabling checkJS
in your js files to track down what is going wrong: https://code.visualstudio.com/Docs/languages/javascript#_type-checking-and-quick-fixes-for-javascript-files
May be i am late in the show but even after trying all of the above answers i was facing the same issue but soon while editing the settings.json (Same as Settings which comes when we do "Ctrl + ," on VSCode) I realized that there was a setting "editor.multiCursorModifier" set as "ctrlCmd" as shown in the snapshot which when i commented resolved my problem. So this may be considered as a solution for the issue posted.
This may be overkill, but it seemed to work for me (on a Mac):
rm -rfv "$HOME/.vscode"
rm -rfv "$HOME/Library/Application Support/Code"
rm -rfv "$HOME/Library/Caches/com.microsoft.VSCode"
rm -rfv "$HOME/Library/Saved Application State/com.microsoft.VSCode.savedState"
Restart VSC - code .
(Should start from scratch)
Also remove .vscode/ rm -rf .vscode/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With