Closed magian1127 closed 9 months ago
Can you leave in a summary of what this does?
Because there are two PR, haven't had time to write explanations yet.
What is "auto method creation"? You still haven't explained what either of these PRs actually does.
This is something that the Godot editor already does entirely on its own. I don't see a reason why VSCode needs to be involved.
During Godot 3.x, it was also achieved using the built-in LSP message workspace/applyEdit
in VSCode.
Of course, it can be done independently within the Godot editor, but that would create many issues.
For instance, if an external editor is actively editing a file and has not been saved yet, allowing GODOT to directly modify it would result in conflicts.
Therefore, the sensible approach is for GDS to send an LSP message, and then the external editor can process it using the corresponding method based on the LSP message.
godot 3.x 的时候也是靠 VSCode 中内置的 LSP 消息 workspace/applyEdit
完成的.
当然可以在 godot 编辑器 中独立完成,但是会产生很多问题.
比如外部编辑器正在编辑文件, 还没有保存, 如果让 GODOT 直接修改,会产生冲突.
所以合理的做法, 就是 GDS 发送 LSP 消息,之后外部编辑器根据 LSP 消息用对应方法处理.
Implemented GDS auto method creation in VSCode together with https://github.com/godotengine/godot/pull/82996 . Later, C# can also use a similar approach for auto method creation in VSCode .