Skip to content

feat: add gdscript preset#204

Open
Felix-Kettnaker wants to merge 1 commit into
Wansmer:mainfrom
Felix-Kettnaker:feat/gdscript
Open

feat: add gdscript preset#204
Felix-Kettnaker wants to merge 1 commit into
Wansmer:mainfrom
Felix-Kettnaker:feat/gdscript

Conversation

@Felix-Kettnaker

Copy link
Copy Markdown

⚠️ disclaimer: FYI: code for this PR is entirely written by AI 🤖.


Add a split/join preset for GDScript (from the Godot Game Engine)(tree-sitter-gdscript):

Bracketed nodes

  • arguments, parameters — argument/parameter lists
  • array, dictionary, enumerator_list
    Arrays, dictionaries and enum bodies join without inner spaces ([1, 2], {"a": 1}, {IDLE, RUN}), matching the GDScript style guide.

Redirects

  • call / attribute_callarguments
  • function_definition / lambdaparameters
  • enum_definitionenumerator_list
  • assignment / augmented_assignment / variable_statement / const_statement / return_statementarray / dictionary / arguments

Tests / docs

  • tests/sample/index.gd + tests/langs/gdscript/{split,join}_spec.lua
  • registered gdscript in configured_langs
  • added to the README language list

Out of scope (for now): statement bodies (if/for/while/match/function bodies). GDScript blocks are indentation-delimited with no closing token, which the current non_bracket range model can't frame; I have a follow-up that adds an opt-in core flag to support it.

Add a split/join preset for GDScript (tree-sitter-gdscript):

- bracketed nodes: arguments, parameters, array, dictionary, enumerator_list
  (arrays/dicts/enums keep no inner spaces, matching the GDScript style guide)
- redirects: call/attribute_call -> arguments, function_definition/lambda ->
  parameters, enum_definition -> enumerator_list, and
  assignment/augmented_assignment/variable_statement/const_statement/
  return_statement -> array/dictionary/arguments

Includes tests/sample/index.gd plus split/join specs, registers gdscript in
configured_langs, and lists it in the README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant