diff --git a/config/nvim/UltiSnips/rust.snippets b/config/nvim/UltiSnips/rust.snippets new file mode 100644 index 0000000..da88543 --- /dev/null +++ b/config/nvim/UltiSnips/rust.snippets @@ -0,0 +1,38 @@ +# rust.snippets +# vim: set ts=8 sw=8 sts=8 noet list: +# Eryn Wells + +snippet nnapp +// Eryn Wells + +use nannou::prelude::*; + +struct Model { + _window: window::Id, +} + +impl Model { + fn new(app: &App) -> Self { + let window = app.new_window().view(view).build().unwrap(); + Self { + _window: window, + } + } + + fn update(app: &App, model: &mut Model, update: Update) { + model.update(app, update) + } + + fn update(&mut self, app: &App, update: Update) { + // TODO: Update the model here. + } +} + +fn view(app: &App, model: &Model, frame: Frame) { + // TODO: Draw the view here. +} + +fn main() { + nannou::app(Model::new).update(update).run(); +} +endsnippet