-
-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hopefully the gibberish in the title above makes some sense. Can you please consider adding an optional GDScript extension setting to specify the relative path to Godot project subfolder if not the same as Zed project root folder?
Basically, when your Zed project root and your Godot project root is the same folder everything appears to be working fine. However when your Godot project is a subfolder buried somewhere down the hierarchy of your Zed project folder structure this is where things start to happen.
Most notably, when you open the Zed project you are always greeted by a toast saying "The GDScript Language Server might not work correctly with other projects than the one opened in Godot".
Another issue is that Godot LSP appears to start parsing incorrect file types with GDScript syntax, even its own types. For example, if say you have a .gdshader file open in one of Zed buffers with something like this:
shader_type spatial;
render_mode unshaded, skip_vertex_transform;
Re-saving this buffer without any changes will trigger new LSP errors all over the place in it clearly todo with shader code being treated as .gdscript instead of .gdshader:
None of this appears to happen when both Zed and Godot project roots are the same folder. Potentially also related to https://github.com/GDQuest/zed-gdscript/issues/6.
The debugger appears to work fine regardless of whether Zed project root == Godot Project root or is down the hierarchy. It looks like only Godot LSP is affected.
Now if you ask me why do I even need to have Godot project in a subfolder of Zed project it is just common sense when organising your project structure. Any game will most likely have other related resources that need to live side-by-side with your Godot project but not a direct part of it. You may have a Documents folder for notes and docs, a Blender/Houdini/Whatever folder for modelling, a Gimp/Affinity/Whatever folder for imaging, server backend source code, you name it. Everything sitting in a common project root dir under source control in a single git repo. At least this is how I'm grouping project stuff together where it makes sense.
This way you can hop between your notes, godot code, server backend code, etc related stuff in a single instance of Zed. As well use Zed's built-in Git support for source control.