module
Lapis::Docs::F_SCRIPTING_AND_INTEROPERABILITY::A_FIRST_CLASS_CRYSTAL_SCRIPTS
Overview
First-Class Crystal Scripts in Godot Editor
Comprehensive guide to Lapis's first-class scripting engine, enabling developers to write,
attach, and edit .cr scripts inside the Godot Editor exactly like GDScript or C#.
Executive Summary & Key Topics
| Topic | Method / Anchor | Description |
|---|---|---|
| Scripting Capabilities | .topic_00_scripting_features |
Native ScriptLanguage integration, syntax highlighting, and live AST inspection. |
| Attaching .cr Scripts to Nodes | .topic_01_attaching_scripts |
Creating and attaching Crystal scripts via the Godot Editor UI. |
Related Guides & Source References
- Crystal Script:
src/libgodot/script/crystal_script.cr - Syntax Highlighter:
src/libgodot/script/crystal_highlighter.cr - Live Specs:
spec/suites/test_script_first_class.cr
Defined in:
libgodot/docs/f_scripting_and_interoperability/a_first_class_crystal_scripts.crClass Method Summary
-
.topic_00_scripting_features : Nil
Scripting Capabilities: Native ScriptLanguage integration, syntax highlighting, and live AST inspection.
-
.topic_01_attaching_scripts : Nil
Attaching cr Scripts to Nodes: Creating and attaching Crystal scripts via the Godot Editor UI.
Class Method Detail
Scripting Capabilities: Native ScriptLanguage integration, syntax highlighting, and live AST inspection.
Key Topics & Information
- Full ScriptLanguage registration in Godot Engine
- Create .cr files from the standard Godot Attach Script dialog
- Pure Crystal syntax highlighter embedded in the Script Editor
- Crystalline LSP code completion proposals and documentation hover
Attaching cr Scripts to Nodes: Creating and attaching Crystal scripts via the Godot Editor UI.
- In Godot's Scene dock, right click any node and select Attach Script.
- In the Language dropdown, select Crystal (
.cr). - Godot automatically creates the
.crfile with proper node template and attaches it to the node. - Double-click the script to open it in Godot's built-in Script Editor!