vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Support extentions providing code snippets via registered text document content providers (fix #248407)

Open mbehzad opened this issue 7 months ago • 1 comments

Hi, this PR implements what was suggested in this issue , which is adding support for extensions defining the path to the snippet file as a custom scheme. e.g.

"contributes": {
    "snippets": [
      {
        "language": "html",
        "path": "my-scheme:/snippets.json"
      }
    ],

Regarding testing, I have created a simple extension based on contentprovider-sample, which you can find it here: https://github.com/mbehzad/snippet-extension-test It can be run via its launch.json or installing its vsix package that is also in the repo here in the vscode from this PR.

Cheers, Mehran

mbehzad avatar May 23 '25 06:05 mbehzad

@microsoft-github-policy-service agree

mbehzad avatar May 23 '25 07:05 mbehzad