1

I'm unable to use ES7 React/Redux/GraphQL/React-Native snippets for some reason even though I have installed the extension required. installed

Digamber negi
  • 407
  • 1
  • 7
  • 20

7 Answers7

7

Search command You can search through snippets with ES7 snippet search command which can be run with CMD + Shift + P or just use CMD + Shift + R (CTRL + ALT + R for Windows & Linux) keybinding.

koowanas
  • 71
  • 1
  • 3
2

you have to downgrade to v3.1.1 for it to work, I faced a similar issue and solved it in this way I think the updated version doesn't work fsr

right-click on the extension and select install another version then on the top a list of the versions will come up then select v3.1.1

rediet yosef
  • 192
  • 1
  • 15
1

I had the same issue. For me, This setting option worked out.

"editor.suggest.showSnippets": true,

// Controls if quick suggestions should show up while typing
  //code snippet Issue https://stackoverflow.com/questions/44321000/visual-studio-code-user-snippets-not-working
  "editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": true,
  },
  // top: Show snippet suggestions on top of other suggestions.
  "editor.snippetSuggestions": "top",
  // Controls whether to automatically show inline suggestions in the editor
  "editor.inlineSuggest.enabled": true,
  // setting which controls if suggestions are triggered by special characters.
  "editor.suggestOnTriggerCharacters": true,
  // Controls auto complete on dot(.)
  // https://stackoverflow.com/questions/49447663/disable-autocomplete-on-dot-in-vscode
  "editor.acceptSuggestionOnCommitCharacter": false,
  // Controls whether sorting favours words that appear close to the cursor
  "editor.suggest.localityBonus": true,
  // Controls how suggestions are pre-selected when showing the suggest list
  "editor.suggestSelection": "recentlyUsed",
  // Controls the delay in ms after which quick suggestions will show up.
  // If set to -1, quick suggestions will show up immediately.
  // If set to +500, quick suggestions will not show up because of Github Copilot
  "editor.quickSuggestionsDelay": 100,
  "editor.suggest.snippetsPreventQuickSuggestions": false,
  // Controls if pressing tab inserts the best suggestion and if tab cycles through other suggestions
  "editor.tabCompletion": "on",
  // Enable word based suggestions
  "editor.wordBasedSuggestions": true,
  "editor.suggest.showColors": true,
  "editor.suggest.showConstants": true,
  "editor.suggest.showConstructors": true,
  "editor.suggest.showCustomcolors": true,
  "editor.suggest.showDeprecated": false,
  "editor.suggest.showEnumMembers": true,
  "editor.suggest.showEnums": true,
  "editor.suggest.showEvents": true,
  "editor.suggest.showFields": true,
  "editor.suggest.showFiles": true,
  "editor.suggest.showFolders": true,
  "editor.suggest.showFunctions": true,
  "editor.suggest.showInterfaces": true,
  "editor.suggest.showIssues": true,
  "editor.suggest.showKeywords": true,
  "editor.suggest.showMethods": true,
  "editor.suggest.showModules": true,
  "editor.suggest.showOperators": true,
  "editor.suggest.showProperties": true,
  "editor.suggest.showReferences": true,
  "editor.suggest.showSnippets": true,
  "editor.suggest.showStructs": true,
  "editor.suggest.showTypeParameters": true,
  "editor.suggest.showVariables": true,
  "editor.suggest.showValues": true,
  "editor.suggest.showWords": true,
  "editor.suggest.showUsers": true,
  "editor.suggest.showUnits": true,
CuriousD3V
  • 11
  • 1
  • 3
0

Had same problem, check this:

Open your VSCode JSON settings,

"ctrl + shift + P" or "Cmd + Shift + P" => then type "Open Settings (JSON)"

copy your current settings and save somewhere else to use it again, then clear all JSON settings and save it by "ctrl + s", close VSCode and open it again, check if ES7 snippets works, then go to JSON settings again and paste your previous settings copied before.

Peyman Baseri
  • 349
  • 1
  • 4
  • 7
0
<Ctrl><Shift>P

Preferences: Open Settings (JSON)

<Ctrl>F
editor.quickSuggestions

Change

"other": false

to

"other": true

This fixed the problem, for me.

Jim
  • 359
  • 2
  • 15
0

The extension stopped working for you because you may change some of your settings.

  1. Make sure you have it installed and enabled, and that, you are working in a file with the proper file extension for them to work (try: .jsx & .tsx).
  2. If they are still not working, which was the case at me also, check your settings, because some of the settings can interfere, and make the extension stop working.
  3. Open settings.json by: CTRL + SHIFT + p , type: settings.json, select: "Open settings (JSON)"
  4. Check in the settings.json file if the following setttings are different than mine:
    "editor.snippetSuggestions": "top",     /*make sure this is NOT "none"*/
    "editor.suggest.snippetsPreventQuickSuggestions": false,
    "editor.quickSuggestions": {
      "other": true,
      "comments": false,
      "strings": true
    },
    "editor.wordBasedSuggestions": true,
    "html.suggest.html5": false,
    "typescript.suggest.paths": false,
    "javascript.suggest.paths": false,

As fast experiment you can copy the whole code, paste it at the end of the settings.json, save it, restart VSC.
If it solved your issue, you can sort the commands one-by-one, to find out which caused the issue of yours.

Exvinp
  • 41
  • 4
0

Check and make sure that you're snippet suggestions priority is not selected as "none"

In your settings search bar: @modified

Editor: Snippet Suggestions

Make sure that the priority is set to "top", or atleast not "none".

Snippet Suggestions Drop Down Options

The default is "inline", but after a long read through VS Code's Intellisense and settings docs I was able to find this by searching through all modified settings with the "@modified" search term I mentioned above. If that does not populate for you, just search for Snippet Suggestions directly.