Feature request: add GDScript (Godot) language support
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- godot, javascript, lua
Research direction
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.
Written by the indexing model from the issue text.
Description
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/signalgraph across many.gdfiles. Today this requiresgrep + Readto 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
- Run
codegraph initin a Godot 4 project (any project with.gdfiles inscripts/). codegraph statusreports0 filesindexed for any language matching.gd.- No
codegraph_explore/codegraph_queryresults return symbols defined in.gdfiles.
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/codegraphvianpm i -g @colbymchenry/codegraph) - macOS arm64
- Test project: a Godot 4 project with ~145
.gdfiles and ~50.tscnscene files
Thanks — happy to iterate on the design.
- Dominant language
- C
- Stars
- 73.2k
- Forks
- 4.7k
- Avg merge
- 2h 13m
- Merged PRs (30d)
- 418
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from colbymchenry/codegraph
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
colbymchenry/codegraph#2634 ·
Maintainers usually reply within 1 day
-
Windows: bundled Node v24.16.0 can abort at exit (nodejs/node#56645); please bundle Node >= 24.20.0Possibly taken @Ancienttwo claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
colbymchenry/codegraph#2617 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Under an hour Newbie friendliness 72/100
colbymchenry/codegraph#2482 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
colbymchenry/codegraph#1900 · 2 comments · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
colbymchenry/codegraph#1700 ·
Maintainers usually reply within 1 day
All issues in colbymchenry/codegraph
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenPrinting/cups#1772 ·
Maintainers usually reply within 1 day
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
antoxa2584x/nfsu2-sw#44 · 1 reaction ·
Maintainers usually reply within 1 day