3

I'm using this vscode extension - ES7 React/Redux/GraphQL/React-Native snippets.

Does anyone know how to config the snippets come with this extension?

5
  • 1
    if the language setting of the file matches that of the snippets file they should be available (javascript, typescript, javascriptreact, typescriptreact) Commented Oct 31, 2020 at 23:41
  • imgur.com/kaOMwDA the snippets files are empty. Seems like the extension is hide the snippets somewhere... Commented Oct 31, 2020 at 23:57
  • 1
    the snippet file is defined IN the extension. Just go to the extension page and try one of the shown snippets in a JavaScript file Commented Nov 1, 2020 at 2:59
  • By "defined IN the extension", does it mean we cannot change the snippets? Commented Nov 14, 2020 at 0:54
  • you can change the snippets in the extension but you lose changes the next extension update, just make a copy of the snippet in a user snippet file and give it a different prefix Commented Nov 14, 2020 at 1:05

2 Answers 2

5

In Windows 10, I did this:

  • Went to

C:\Users\{username}\.vscode\extensions\dsznajder.es7-react-js-snippets-4.4.3\lib\snippets

  • Edited the

generated.json

  • Saved it

  • Restarted VS Code

Now, it works for me.

Sign up to request clarification or add additional context in comments.

Comments

1

As there is no direct way to edit the es7 snippets from VS Code.

You can go to your file manager → press ctrl + h (to view hidden files) → .vscode → extensions → dsznajder.es7-react-js-snippets-x.x.x → snippets → snippets.json

Open snippets.json in any text editor and customize snippets

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.