In my VS Code editor, Ctrl+click and F12 don't work for "go to definition" (Laravel)

145 Views Asked by At

In my VS Code editor Ctrl+click and F12 don't works for "go to definition". I'm working on a Laravel project, whenever I click Ctrl+click for the definition of a method it's not working. My VS Code is up to date, no update available. I tried to Edit in keyboard shortcuts/preferences but it still doesn't work.I disabled some extensions, (ESLint, Prettier etc.). I tried to go to settings and see Preferences, Keyboard shortcuts , there where set "Ctrl + Click" or F12. I tried to replace them with some other code, but not working, replacement is also not working.

1

There are 1 best solutions below

0
matleg On

In your VSCode keyboard settings, ensure that you have the correct "when" column filled out:

{
  "key": "f12",
  "command": "editor.action.revealDefinition",
  "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
}