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

Add VS Code snippets for Bevy #247

Merged
merged 4 commits into from
Aug 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .vscode/bevy.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"Bevy: New module-level function Plugin": {
"scope": "rust",
"prefix": "plugin_fn",
benfrankel marked this conversation as resolved.
Show resolved Hide resolved
"body": [
"use bevy::prelude::*;",
benfrankel marked this conversation as resolved.
Show resolved Hide resolved
"",
"pub(super) fn plugin(app: &mut App) {",
"\t$0",
janhohenheim marked this conversation as resolved.
Show resolved Hide resolved
"}"
],
"description": "Define a new module-level function Plugin"
},
"Bevy: New Component": {
"scope": "rust",
"prefix": "component",
"body": [
"#[derive(Component, Reflect)]",
benfrankel marked this conversation as resolved.
Show resolved Hide resolved
"#[reflect(Component)]",
"struct $1;"
],
"description": "Define a new Component"
},
"Bevy: New Resource": {
"scope": "rust",
"prefix": "resource",
"body": [
"#[derive(Resource, Reflect, Default)]",
benfrankel marked this conversation as resolved.
Show resolved Hide resolved
"#[reflect(Resource)]",
"struct $1;"
],
"description": "Define a new Resource"
},
"Bevy: New Event": {
"scope": "rust",
"prefix": "event",
"body": [
"#[derive(Event)]",
benfrankel marked this conversation as resolved.
Show resolved Hide resolved
"struct $1;"
],
"description": "Define a new Event"
},
"Bevy: New SystemSet": {
"scope": "rust",
"prefix": "system_set",
"body": [
"#[derive(SystemSet, Copy, Clone, Eq, PartialEq, Hash, Debug)]",
"enum $1 {",
"\t$0",
"}"
],
"description": "Define a new SystemSet"
},
"Bevy: New Schedule": {
"scope": "rust",
"prefix": "schedule",
"body": [
"#[derive(ScheduleLabel, Copy, Clone, Eq, PartialEq, Hash, Debug)]",
"struct $1;"
],
"description": "Define a new Schedule"
},
"Bevy: New States": {
"scope": "rust",
"prefix": "states",
"body": [
"#[derive(States, Copy, Clone, Default, Eq, PartialEq, Hash, Debug, Reflect)]",
"enum $1 {",
"\t#[default]",
"\t$0",
"}"
],
"description": "Define a new States"
benfrankel marked this conversation as resolved.
Show resolved Hide resolved
}
}