Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature request: add GDScript (Godot) language support

Đang mở
#1,618 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
godot, javascript, lua
Lĩnh vực
devtools, tooling

Hướng nghiên cứu

Read the Supported Languages section in README.md and the registrations in extraction/languages/index.js; compare how existing language extractors are wired. The issue leaves open whether to use a native tree-sitter grammar or extend extraction/languages/lua.js, so first determine which approach fits the project. Done means .gd files are indexed and the listed GDScript symbols can be queried.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Feature request: add GDScript (Godot) language support

Summary

GDScript — the primary scripting language for Godot Engine 4.x projects — is not currently in the list of supported languages (README.md "Supported Languages" section and extraction/languages/index.js registrations).

Why it matters

GDScript is one of the highest-popularity languages in the indie / open-source game-dev ecosystem, and Godot projects have characteristics that CodeGraph's pre-indexed model is particularly well-suited for:

  • Heavy cross-file references: Godot scenes, autoloads, and signals create a dense extends / class_name / @onready / signal graph across many .gd files. Today this requires grep + Read to reconstruct, which is exactly the workflow CodeGraph replaces.
  • Auto-sync fits the iterative gameplay-loop: CodeGraph's "index updates on every file change" model is a natural fit for the gameplay / UI iteration cycle Godot projects go through.
Concrete repro
  1. Run codegraph init in a Godot 4 project (any project with .gd files in scripts/).
  2. codegraph status reports 0 files indexed for any language matching .gd.
  3. No codegraph_explore / codegraph_query results return symbols defined in .gd files.

Expected: the 145 .gd files in a typical Godot project should appear under Files by Language, and GDScript symbols (class_name, func, signal, extends, var, @onready, preload, load) should be queryable.

Proposed approach

There are two reasonable paths; happy to send a PR either way:

A. Native tree-sitter grammar — tree-sitter-gdscript is maintained (https://github.com/PrestonKnopp/tree-sitter-gdscript) and already vendored by some tools. Mirrors how the other 27 languages in extraction/languages/ are wired.

B. Extend the existing Lua extractor — Given the recent Lua-parser work (#1616, #1617), GDScript's Lua-influenced syntax (block-by-indent, func/var declarations, extends/signal/class_name keywords layered on top) could be supported by extending extraction/languages/lua.js with a thin GDScript overlay rather than maintaining a separate extractor. Faster to land, naturally benefits from the same edge / dynamic-dispatch resolution infrastructure the Lua extractor is being improved with right now. Less accurate than a native grammar, but unblocks Godot users quickly.

Environment
  • CodeGraph v1.5.0 (/opt/homebrew/bin/codegraph via npm i -g @colbymchenry/codegraph)
  • macOS arm64
  • Test project: a Godot 4 project with ~145 .gd files and ~50 .tscn scene files

Thanks — happy to iterate on the design.

Ngôn ngữ chính
C
Star
73.2k
Fork
4.7k
Merge trung bình
4 giờ 46 phút
Pull request đã merge (30 ngày)
478

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của colbymchenry/codegraph

Tất cả issue của colbymchenry/codegraph

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.