extensions
extensions copied to clipboard
GDScript
Check for existing issues
- [X] Completed
Language
GDScript
Tree Sitter parser link
No response
Language server link
https://github.com/godotengine/godot
Misc notes
Looks like the language server is with the engine/editor distribution itself
And looks like there was a bit of history around the language server being implemented in an odd way, but hopefully this resolves it https://github.com/godotengine/godot/pull/35864
And here is a GDScript tree-sitter parser (was implemented in helix-editor, written in Rust) https://github.com/helix-editor/helix/tree/6a323c0b1b8fd2491dcbca38b5a1f62bf9581da4/runtime/queries/gdscript
I've found today another treesitter implemented: https://github.com/PrestonKnopp/tree-sitter-gdscript And there is one for the resources too here: https://github.com/PrestonKnopp/tree-sitter-godot-resource
The second one, was not updated in three years.
There is some documentation on how to create an extension or this stuff? I only found this: https://zed.dev/docs/adding-new-languages maybe because I never did anything like that, but I don't understand it
Got a quick test working locally. Not sure how to publish it to Zed though. Also no LSP support yet as it is not yet opened up by Zed yet (correct me if I'm wrong).
To reproduce it yourself:
- Build a wasm from https://github.com/PrestonKnopp/tree-sitter-gdscript using
tree-sitter-cli
. - Create a
gdscript
extension folder in/Users/markbrand/Library/Application Support/Zed/extensions/installed
(See other extensions to recreate the folder/file structure) - put the compiled wasm under
grammars/gdscript.wasm
- copy the
scm
files from https://github.com/helix-editor/helix/tree/6a323c0b1b8fd2491dcbca38b5a1f62bf9581da4/runtime/queries/gdscript inlanguages/gdscript/...
- Reload Zed
Got a quick test working locally. Not sure how to publish it to Zed though. Also no LSP support yet as it is not yet opened up by Zed yet (correct me if I'm wrong).
To reproduce it yourself:
- Build a wasm from https://github.com/PrestonKnopp/tree-sitter-gdscript using
tree-sitter-cli
.- Create a
gdscript
extension folder in/Users/markbrand/Library/Application Support/Zed/extensions/installed
(See other extensions to recreate the folder/file structure)- put the compiled wasm under
grammars/gdscript.wasm
- copy the
scm
files from https://github.com/helix-editor/helix/tree/6a323c0b1b8fd2491dcbca38b5a1f62bf9581da4/runtime/queries/gdscript inlanguages/gdscript/...
- Reload Zed
Hey @grndctrl - you can publish by opening a PR within this repo - check out this PR as an example.
And yes, you are correct, we don't have language server support in extensions yet, but it is being worked on.
Thanks @JosephTLyons for pointing me in the right direction, I created a PR #219
@JosephTLyons apologies for the tag, but this one can be closed now right?
I was just looking at working on some of the top requests and don't have a way to close completed ones 👀
@eth0net I think we're waiting for language server support which isn't available to zed extensions yet.
Ah sorry I missed that, my bad! Language servers are now supported however 🚀
Hi, I'm the one who threw together the GDScript extension, I haven't found the time yet to implement the LSP. I really want to, although I never really built something in Rust. If anyone has a good example from which I can work, I'll try to fit it in my schedule. Or have a stab at it when I'm on paternity leave soon.
@grndctrl a good place to find examples is in the extensions repo itself. Check it out locally with submodules included and you can see all the other submitted extensions, all the ones I've looked into were licensed permissively so you can use those as references :)
There are also some docs on implementing language server extensions in AUTHORING_EXTENSIONS.md
.
Language servers are now supported however 🚀
ah thanks! I had missed that
@grndctrl I submitted a PR (https://github.com/grndctrl/zed-gdscript/pull/2) with a simple working integration. Happy to take feedback there, or feel free to use it as a working example to build upon.
@moomerman Thank you so much! I will look into this later.
Language server support was added in https://github.com/zed-industries/extensions/pull/594.
I think we're good to close this out.