-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add a VS Code snippet config for creating new BCD files. #2939
Conversation
It may also be worth adding a snippet for a file with a subfeature, for convenience's sake. |
7b7a2f2
to
72c05e2
Compare
I used this when creating the hanging-punctuation PR (#2950), and I think it's worth noting that the snippet doesn't work quite right for CSS because it doesn't suggest the subcategories, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @connorshea, I just tested it and it's a nice enhancement. It might not be perfect for every case, but it's a nice template to start from.
I have a suggestion for the status block, but otherwise this is good to go for me.
.vscode/snippets.code-snippets
Outdated
" \"status\": {", | ||
" \"experimental\": ${4|true,false|},", | ||
" \"standard_track\": ${5|true,false|},", | ||
" \"deprecated\": ${6|true,false|}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this ${6|false,true|}"
?
If you don't tab through until here, it is set to true
by default and deprecated: true
isn't typical most of the time.
.vscode/snippets.code-snippets
Outdated
" }", | ||
" },", | ||
" \"status\": {", | ||
" \"experimental\": ${4|true,false|},", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also suggest to make this false,true
@Elchi3 resolved 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 👍
I'm not sure if this is particularly useful, but I figured I'd try it anyway :) This makes it really easy to create a new BCD file. It'll show up whenever you type
bcd
in a JSON file in this repository.NOTE: You'll need v1.28 (just came out today) for this, otherwise project-level snippets won't work.
Here's an example video
I created this with help from https://snippet-generator.app
VS Code docs: https://code.visualstudio.com/docs/editor/userdefinedsnippets