Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 9 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
[![Version](https://vsmarketplacebadge.apphb.com/version/dsznajder.es7-react-js-snippets.svg)](https://vsmarketplacebadge.apphb.com/version-short/dsznajder.es7-react-js-snippets.svg)
[![Install](https://vsmarketplacebadge.apphb.com/installs/dsznajder.es7-react-js-snippets.svg)](https://vsmarketplacebadge.apphb.com/installs-short/dsznajder.es7-react-js-snippets.svg)
[![Downloads](https://vsmarketplacebadge.apphb.com/downloads/dsznajder.es7-react-js-snippets.svg)](https://vsmarketplacebadge.apphb.com/downloads-short/dsznajder.es7-react-js-snippets.svg)
[![Ratings](https://vsmarketplacebadge.apphb.com/rating-short/dsznajder.es7-react-js-snippets.svg)](https://vsmarketplacebadge.apphb.com/rating-short/dsznajder.es7-react-js-snippets.svg)

# VS Code ES7+ React/Redux/React-Native/JS snippets

JavaScript and React/Redux snippets in ES7+ with Babel plugin features for [VS Code](https://code.visualstudio.com/)
Expand All @@ -25,28 +20,21 @@ ext install dsznajder.es7-react-js-snippets

## Options

From version 4 extension provides options to customize the behavior of the snippets:

| Option | Description |
| ---------------: | ---------------------------------------------------------------------------- |
| languageScopes | list of supported languages / files recognition |
| prettierEnabled | determines if snippets should be parsed with project prettier config |
| importReactOnTop | If disabled, snippets won't contain `import React` on top. React 17+ support |
| typescript | adds additional typescript snippets |

# Sponsors
| Option | Description |
| ----------------------: | ------------------------------------------------------------------------------------------------------ |
| languageScopes | Comma-separated list of language scopes where snippets are available (default: `typescript,typescriptreact,javascript,javascriptreact`) |
| importReactOnTop | Adds `import React` at the top of component snippets. Enable for legacy projects pre-React 17 (default: `false`) |
| typescript | Adds TypeScript-specific component snippets (default: `true`) |
| typescriptPropsStatePrefix | Controls `type` vs `interface` for TypeScript Props/State (default: `type`) |

<p><a title="Try CodeStream" href="https://sponsorlink.codestream.com/?utm_source=vscmarket&amp;utm_campaign=es7_react&amp;utm_medium=banner"><img src="https://alt-images.codestream.com/codestream_logo_es7_react.png"></a></br>
Manage pull requests and conduct code reviews in your IDE with full source-tree context. Comment on any line, not just the diffs. Use jump-to-definition, your favorite keybindings, and code intelligence with more of your workflow.<br> <a title="Try CodeStream" href="https://sponsorlink.codestream.com/?utm_source=vscmarket&amp;utm_campaign=es7_react&amp;utm_medium=banner">Learn More</a></p>

<br>
**Note:** Changing settings requires a VS Code restart to take effect.

### Conquer of Completion

It is possible to use this package in your vim/neovim text editor, to make this possible, make sure you have the `coc.nvim` previously configured, then add this command to your `init.vim`

```shell
Plug 'dsznajder/vscode-es7-javascript-react-snippets', { 'do': 'yarn install --frozen-lockfile && yarn compile' }
Plug 'r5n-labs/vscode-react-javascript-snippets', { 'do': 'yarn install --frozen-lockfile && yarn compile' }
```

Update your vim / neovim settings with `:source %` and then install the new package with `:PlugInstall`
Expand All @@ -60,7 +48,7 @@ Note: This example uses `vim-plug` as a package manager, feel free to use some o
For use with packer the syntax is a little different. Just add in your `init.vim` or `init.lua`:

```shell
use {'dsznajder/vscode-es7-javascript-react-snippets',
use {'r5n-labs/vscode-react-javascript-snippets',
run = 'yarn install --frozen-lockfile && yarn compile'
}
```
Expand Down
Loading
Loading