Skip to content

feat: add Godot gdscript language server support via built-in TCP adapter#1143

Closed
K0d1ax wants to merge 2 commits intooraios:mainfrom
K0d1ax:feat/gdscript-support
Closed

feat: add Godot gdscript language server support via built-in TCP adapter#1143
K0d1ax wants to merge 2 commits intooraios:mainfrom
K0d1ax:feat/gdscript-support

Conversation

@K0d1ax
Copy link

@K0d1ax K0d1ax commented Mar 9, 2026

Summary

This PR adds first-class gdscript support to Serena/SolidLSP.

It introduces a built-in GDScript language server adapter that connects to Godot’s LSP endpoint over TCP (default 127.0.0.1:6005) via an
internal transport process, so users can configure gdscript directly in project.yml.

Important

Godot editor MUST be running with LSP enabled and reachable at configured host/port!

Motivation

Today, gdscript is not a valid Serena language key, so .gd files cannot be handled by symbolic tools through the LSP backend.

Changes

  • Added Language.GDSCRIPT = "gdscript" in ls_config.py.
  • Added .gd file matching in get_source_fn_matcher.
  • Added LS class mapping for gdscript in get_ls_class.
  • Added new server implementation:
    • src/solidlsp/language_servers/gdscript_language_server.py
  • Added internal stdio<->TCP transport module:
    • src/solidlsp/language_servers/gdscript_tcp_proxy.py
  • Updated templates/docs:
    • src/serena/resources/project.template.yml
    • docs/01-about/020_programming-languages.md
    • docs/02-usage/050_configuration.md
    • README.md
    • CHANGELOG.md
  • Added tests:
    • test/solidlsp/gdscript/test_gdscript_support.py

Configuration

project.yml:

languages:
  - gdscript

serena_config.yml (optional):

ls_specific_settings:
  gdscript:
    host: "127.0.0.1"
    port: 6005
    connect_timeout: 10.0

## Validation

- uv run --with pytest pytest -o addopts="" test/solidlsp/gdscript/test_gdscript_support.py -q
    - Result: 8 passed
- uv run --with ruff ruff check src/solidlsp/ls_config.py src/solidlsp/language_servers/gdscript_language_server.py src/solidlsp/
  language_servers/gdscript_tcp_proxy.py test/solidlsp/gdscript/test_gdscript_support.py
    - Result: all checks passed

## Notes

- Godot editor must be running with LSP enabled and reachable at configured host/port.
- Defaults align with Godot’s common setup (127.0.0.1:6005).

@K0d1ax
Copy link
Author

K0d1ax commented Mar 9, 2026

No conflicts with base branch
Changes can be cleanly merged.

@K0d1ax K0d1ax closed this Mar 9, 2026
@K0d1ax K0d1ax reopened this Mar 9, 2026
@K0d1ax K0d1ax closed this Mar 9, 2026
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