module Lapis::Docs::F_SCRIPTING_AND_INTEROPERABILITY::C_DOC_COMMENTS_AND_F1_HELP

Overview

Doc Comments & Godot In-Editor F1 Help

Comprehensive guide to how Lapis automatically harvests regular Crystal # comments above classes, properties, signals, and methods at compile-time and injects them into Godot's F1 Help.

Executive Summary & Key Topics

Topic Method / Anchor Description
Documentation Harvesting Invariants .topic_00_harvesting_features Automatic zero-overhead doc extraction into Godot's native DocData XML engine.
Doc Comment Authoring Syntax .topic_01_authoring_syntax Formatting comments for optimal rendering in both Crystal Docs and Godot EditorHelp.

Related Guides & Source References

Defined in:

libgodot/docs/f_scripting_and_interoperability/c_doc_comments_and_f1_help.cr

Class Method Summary

Class Method Detail

def self.topic_00_harvesting_features : Nil #

Documentation Harvesting Invariants: Automatic zero-overhead doc extraction into Godot's native DocData XML engine.

Key Topics & Information

  • Zero manual XML authoring: Write regular Crystal # comments above definitions
  • Class, property, method, and signal descriptions are extracted at compile-time
  • Injected into Godot's EditorHelp XML database on bridge initialization
  • Full offline F1 Help and hover Inspector tooltips in Godot Editor

def self.topic_01_authoring_syntax : Nil #

Doc Comment Authoring Syntax: Formatting comments for optimal rendering in both Crystal Docs and Godot EditorHelp.

# Player character with physics movement, health tracking, and abilities.
node Player < CharacterBody3D do
  # Movement speed in meters per second.
  @[Export]
  property speed : Float32 = 7.0_f32

  # Emitted when player health drops to zero.
  signal died

  # Applies raw physical impulse to character body.
  def apply_impulse(force : Vector3) : Void
  end
end

When compiled into game.dll, crystal_bridge.dll extracts these docstrings and registers them with Godot's EditorHelp. Pressing F1 inside the Godot Editor and searching for Player will display this exact manual!