Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gdscript-lsp

General-purpose L2 GDScript Language Server for Godot 4.7+.

Stdio JSON-RPC, zero-config — works with any LSP client (VS Code, Neovim, OMP, etc.).

Features

Operation What it does
Diagnostics Syntax errors + extends chain validation
Document Symbols func, var, const, signal, class_name, extends
Go to Definition extends, class_name, preload, class methods
Find References Global search with scope-aware filtering
Hover Function signatures + ## doc comments
Rename Global symbol rename via workspace/applyEdit
Completion Keywords, locals, extends chain members, Godot built-in API

Install

npm install -g gdscript-lsp

Usage

The server communicates over stdio using the LSP 3.17 protocol. Configure your LSP client:

{
  "servers": {
    "gdscript-lsp": {
      "command": "gdscript-lsp",
      "args": ["--stdio"],
      "fileTypes": [".gd"],
      "rootMarkers": ["project.godot"]
    }
  }
}

Godot API Stubs

The server ships with a pre-generated stubs/stubs.json containing the full Godot 4.7 class API (810 classes). To regenerate for a different Godot version:

# Generate API XML from your Godot engine
godot --doctool --path /tmp/godot-docs

# Generate stubs.json
npx ts-node stubs/generate.ts /tmp/godot-docs/doc/classes

Development

npm install
npm run build
npm test                  # 68 tests
npm run stubs:generate     # regenerate stubs.json

Tech Stack

  • TypeScript 5.7, Node.js v24
  • tree-sitter-gdscript (v6.1.0) for parsing
  • vscode-languageserver (v10) for LSP protocol

License

MIT

About

GDScript Language Server — diagnostics, symbols, go-to-definition, references, hover, rename, completion for ▏ Godot 4.7+. Stdio JSON-RPC, works with any LSP client.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages