Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbehzad
Copy link

@mbehzad mbehzad commented May 23, 2025

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
Copy link
Author

mbehzad commented May 23, 2025

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants