Skip to content
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

Mark the schema of our built-in extension's snippets #94625

Closed
wants to merge 1 commit into from

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Apr 7, 2020

Adds "$schema": "vscode://schemas/snippets" to all the snippet files for our built-in snippets. This gives us intellisense while editing the snippets

@aeschli Adding the schema works but I see a yellow warning on the $schema:

Screen Shot 2020-04-07 at 11 21 10 AM

I cannot figure out what this error means or how to fix it. Could you please take a look?

Adds `"$schema": "vscode://schemas/snippets"` to all the snippet files for our built-in snippets. This gives us intellisense while editing the snippets
@mjbvz mjbvz added this to the April 2020 milestone Apr 7, 2020
@mjbvz mjbvz requested a review from aeschli April 7, 2020 18:23
@mjbvz mjbvz self-assigned this Apr 7, 2020
@aeschli
Copy link
Contributor

aeschli commented Apr 8, 2020

The 'object expected ' warning comes from here:

Every property in the snippet file is considered a snippet declaration

@aeschli
Copy link
Contributor

aeschli commented Apr 8, 2020

Instead of adding "$schema": "vscode://schemas/snippets" everywhere, I would suggest a specific file name that we can the associate to.

foo.code-snippets.json
Going for code-snippets instead of snippets avoid clashing with other (non- VSCode) snippet files.

I will use the same name convention in the yeoman generator

@aeschli
Copy link
Contributor

aeschli commented Apr 8, 2020

We already have a suffix .code-snippets for global snippets. Global snippets are snippets that also support the scope property
Talked to @jrieken and it turns out also extension snippets are allowed to use the scope property.
-> We use to use .code-snippets as suffix for extension snippets.

@aeschli aeschli closed this in d5e12a1 Apr 8, 2020
aeschli added a commit to microsoft/vscode-generator-code that referenced this pull request Apr 8, 2020
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants