Skip to content

snipsnapdev/snipsnap-vscode

Repository files navigation

Snipsnap Logo

Snipsnap VS Code extension

The ultimate snippets collection and VS Code extension that automatically exposes all available snippets for every library you are using in your project.

Read More

out

VS Code Marketplace VS Code Marketplace Downloads

Popular snippets

How to search for a snippet?

Search library's snippets

  • Type your library name, if it's present in the list and you have it in your package.json/yarn.lock.
  • Navigate through available snippets for your library and select the one you need.
  • Use tab in order to switch cursor between highlighted parts of the snippet.

Access Javascript base snippets

To access base snippets for Javascript just type keyword base and you will see the list of available snippets such as import, export, loops, functions etc. All base snippets you can find there.

For more information about the project please visit main Snipsnap repository.

Visit documentation

Installation

Install through VS Code extensions. Search for Snipsnap-vscode

Visual Studio Code Market Place: Snipsnap - snippets handler

Can also be installed in VS Code: Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install snipsnap-vscode

Configuration

No config required and more than that - no config even exists! You are good to go right after installing the extension.

Usage

No manual activation required as well, the extension triggers if your workspace folder contains package.json file and does magic on its own, but if you still need to trigger it, use Reload Window in Command Palette.

Settings

Silent mode

You can turn the successful snipet fetching notification off by specifying snipsnap.silent property's value to true in your VSCode's settings.json:

// settings.json
{
  // other user settings
  "snipsnap.silent": true
}

Or by using GUI:

Ignore libraries

Snipsnap works by gathering all deps throughout the project, even from lock files, so some of subdependencies like lodash could pollute your snippets environment and become a major frustrating factor.

To ensure that no %unwanted_library% snippets are being fetched, you should create .snipsnapignore.json file at the root of your project and specify all libraries you want to be ignored in a single list, e.g.

["react", "lodash", "html"]

Error Messages

Reload using Command Paletter or just reload the window. If the problem hasn't dissapeared, please, submit an issue with a description.

Telemetry

This extension respects the VS Code telemetry setting so if you have telemetry disabled in VS Code we will also not collect telemetry. See the Visual Studio Code docs for information on how to disable telemetry.

However, at this point 0 telemetry data is being gathered if you did not tweaked vscode telemetry settings.

License

MIT