Skip to content

Instantly share code, notes, and snippets.

@ForwardFeed
Last active May 29, 2026 15:56
Show Gist options
  • Select an option

  • Save ForwardFeed/5071e628177bedee76867e3b2472b82c to your computer and use it in GitHub Desktop.

Select an option

Save ForwardFeed/5071e628177bedee76867e3b2472b82c to your computer and use it in GitHub Desktop.
Bevy Snippets (VSCodium || VSCode)
"BevyPrelude": {
"prefix": "BevyPrelude",
"body": [
"use bevy::prelude::*;",
""
]
},
"BevyPlugin": {
"prefix": "BevyPlugin",
"body": [
"pub struct $1;",
"",
"impl Plugin for $1 {",
"\tfn build(&self, app: &mut App){",
"\t\t",
"\t}",
"}"
]
},
"BevyCommand": {
"prefix": "mut commands",
"body": "mut commands: Commands"
},
"BevyComponent": {
"prefix": "BevyComponent",
"body": [
"#[derive(Component)]",
"struct $1;",
]
},
"BevyObserverFactory": {
"prefix": "BevyObserverFactory",
"body": [
"fn $1<E: EntityEvent>(",
"\t",
")-> impl Fn(On<E>, Query<$2>>){",
"\tmove |event, mut query|{",
"\t\tif let Ok(mut stuff) = query.get_mut(event.event_target()){",
"\t\t",
"\t\t}",
"\t}",
"}"
]
},
"BevyStates": {
"prefix": "BevyStates",
"body": [
"#[derive(Debug, Clone, Eq, PartialEq, Hash, Default, States)]",
"enum $1 {",
"\t#[default]",
"\tClosed,",
"\tOpen,",
"}",
".init_state::<$1>()"
]
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment