GDScript
Zed 中对 Godot GDScript 语言的支持由社区维护的 GDScript 扩展提供。请将问题报告至:https://github.com/GDQuest/zed-gdscript/issues
- Tree-sitter:PrestonKnopp/tree-sitter-gdscript 和 PrestonKnopp/tree-sitter-godot-resource
- 语言服务器:gdscript-language-server
先决条件
你需要
- Godot.
- 系统中 PATH 中有 netcat (
nc或ncat)。
设置
- 在 Godot 编辑器中,打开“编辑器设置”,找到
文本编辑器 -> 外部并设置以下选项- 执行路径:
/path/to/zed - 执行标志:
{project} {file}:{line}:{col} - 使用外部编辑器:“✅ 开启”
- 执行路径:
- 通过 Godot 打开任何 *.gd 文件,Zed 将会启动。
使用
当 Godot 运行时,GDScript 扩展将连接到 Godot 运行时提供的语言服务器,并提供 跳转到定义、按住 Ctrl/Cmd 时的悬停状态以及其他语言服务器功能。