0x-jerry / vscode-remote-snippets

Auto fetch snippets from remote and load it.
https://marketplace.visualstudio.com/items?itemName=fantasy.vscode-remote-snippets
MIT License
4 stars 2 forks source link
remote remote-snippet snippet typescirpt vscode-extension

vscode-remote-snippets

Auto fetch snippets from remote and load it.

Features

Usage

You may need specify some snippets remote address, It supports a single snippet config, something like https://raw.githubusercontent.com/hollowtree/vscode-vue-snippets/master/snippets/html.json, it also supports snippets config, like https://raw.githubusercontent.com/0x-jerry/snippets/main/package.json. And the most excited feature, local dynamic snippets.

{
  "remote-snippets.snippets": [
    {
      "path": "https://raw.githubusercontent.com/hollowtree/vscode-vue-snippets/master/snippets/html.json",
      "language": "vue,html"
    }
  ],
  "remote-snippets.config": [
    "https://raw.githubusercontent.com/0x-jerry/snippets/main/package.json"
  ],
  "remote-snippets.js": ["snippets/now.js"]
}

About how to use local dynamic snippets with remote-snippets.js configuration item, please see example.

About how to write snippet, please refer to https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax.