Home > Net >  Vscode does not suggest imports when pressing CTRL . but does suggest them during autocomplete whe
Vscode does not suggest imports when pressing CTRL . but does suggest them during autocomplete whe

Time:07-13

When there is a Javascript module in my code that has not been imported yet, such as React's useCallback, highlightling useCallback and pressing CTRL ., Vscode does not suggest importing useCallback

However, if I were to type out useCallback, Vscode will suggest importing useCallback. I will expect pressing CTRL . to do the same.

How can Vscode be configured so that pressing CTRL . will suggest the import?

Using the following JS extensions

CodePudding user response:

Some time it's not work. You can restart your vscode for solve the problems. If its

CodePudding user response:

Do you have extension ES7 React/Redux/React-Native snippets installed? (https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets)

Also Ctrl Space should suggest in my opinion

  • Related