Skip to content

Type to search extensions

Rust Snippets

v0.1.0

Rust snippets for the Zed IDE. A collection of Rust snippets to improve your development speed.

Updated 2 months ago
60k downloads 13 stars Repository ↗

Rust Snippets for Zed

Installation

  1. Clone this repo:
git clone https://github.com/bobbymannino/rust-snippets-for-zed
  1. Go to the Extensions menu in the Zed IDE
  2. Click "Install Dev Extension"
  3. Select the folder you cloned

Available Snippets

  • let-vec Initialize an immutable vec
  • mut-vec Initialize a mutable vec
  • match-option Match an option statement
  • match-result Match a result statement
  • if-some If let Some pattern matching
  • clone-struct Clone struct
  • debug-struct Debug struct
  • clone-and-debug-struct Clone and debug struct
  • win-only A Windows only derive
  • mac-only A macOS only derive
  • linux-only A Linux only derive
  • ios-only An iOS only derive
  • android-only An Android only derive
  • if-ok If let Ok pattern matching
  • let-else Let else binding with early return
  • while-some While let Some loop
  • for-in For loop over an iterator
  • fn A function
  • async-fn An async function
  • pub-fn A public function
  • pub-async-fn A public async function
  • impl An impl block
  • impl-trait Implement a trait for a type
  • fn-new A new() constructor
  • impl-default Implement Default for a type
  • impl-display Implement Display for a type
  • impl-from Implement From for a type
  • trait A trait definition
  • enum An enum definition
  • match A match statement
  • test A test function
  • test-mod A tests module
  • main The main function
  • serde-struct A serializable and deserializable struct
  • derive-all Derive the common traits
  • hash-map Initialize a mutable HashMap
  • hash-set Initialize a mutable HashSet
  • unsafe An unsafe block
  • allow Allow a lint
ZedExt An unofficial community project. Not affiliated with Zed Industries.

Data from Zed’s extension registry and GitHub · updated