← All extensions

GDScript Snippets

v0.0.2 · by Loyal · added 3 November 2026

A collection of Godot 4 snippets for faster development.

Snippets

How to install

With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.

You can also open the Extensions panel in the app and search for GDScript Snippets. The extension's id is gdscript-snippets.

Don't have Forge Super yet? Download it here.

README

From the extension's repository, written by its authors and not by Mentenaz. See the source.

GDScript Snippets for Zed Editor

A useful collection of Godot 4 snippets that speeds up development in the Zed editor.

Features

  • Core lifecycle callbacks (_ready, _process, _physics_process, _input, _unhandled_input)
  • Custom functions with optional return‑type hints
  • Static functions, variables, exported variables, and on‑ready shortcuts
  • Getters / setters, enums, signals, and signal connections
  • Common control‑flow constructs (if, ifelse, for, match)
  • Utility helpers (printing, awaiting signals, timers)
  • Simple, memorable prefixes that expand instantly

Installation

From the Zed Marketplace

  1. Open Extensions in Zed.
  2. Search for “gdscript‑snippets”.
  3. Click Install.

From Source

git clone https://github.com/loyal-disloyal/gdscript-zed-snippets.git

  1. In Zed, go to Extensions → Install Dev Extension.
  2. Browse to the cloned folder and select it.

Usage

Start typing a prefix (e.g., ready) in a .gd file and press Tab to expand the snippet.

Compatibility with Other Extensions

These snippets work side‑by‑side with the community‑maintained GDScript support extension:

🔗 GDQuest’s GDScript extension: https://github.com/GDQuest/zed-gdscript

Install both extensions together—the GDQuest extension provides syntax highlighting, and language‑server features, while GDScript Snippets supplies quick‑insert templates for common patterns.

Available Snippets

PrefixDescription
ready_ready() – called when the node enters the scene tree
process_process(delta) – called every frame
physics_physics_process(delta) – called each physics tick
inp_input(event) – generic input handler
unhandled_unhandled_input(event) – handles input not consumed by UI
voidCustom function returning void
funcretCustom function with explicit return type
stfuncStatic function returning void
lambAnonymous (lambda) function.
varTyped variable with an initial value
stvarStatic (class‑level) variable
exportExported variable visible in the Inspector
gst / vargetsetVariable with modern getter & setter
enumEnumeration definition
onvar@onready variable evaluated once on scene entry
onready@onready shortcut to fetch a node ($NodePath)
lerpLinear interpolation helper
clampClamp a value between min and max
loadresLoad a resource at runtime
preloadresPreload a resource at compile time
ifSimple if statement
ifelseif / else statement
forfor … in … loop
matchmatch (switch‑like) statement
signalDeclare a custom signal
scConnect a signal to a method
awaitAwait a signal
waitsecWait a number of seconds using a timer
waitframeWait until the next process frame
printPrint a message to the console
prwarnPrint a warning
prerrPrint an error with stack trace
classDefine an inner class
cnRegister the script as a global class (class_name)

Contributing

We appreciate community contributions! To add or improve snippets:

  1. Fork the repository.
  2. Create a feature branch (e.g., feature/add‑physics‑callback).
  3. Edit snippets/gdscript.json (or other relevant files).
  4. Commit with a clear message, push the branch, and open a Pull Request against main.
  5. Include a short description of the change and reference any related issues.

Your contribution will be reviewed promptly and merged once approved.

License

This project is released under the MIT License. See the LICENSE file for details.

Author

Loyal – loyal-disloyal@proton.me

Repository

https://github.com/loyal-disloyal/gdscript-zed-snippets