godot-vscode-plugin icon indicating copy to clipboard operation
godot-vscode-plugin copied to clipboard

Add a context menu option to open `*.tscn` in the Godot scene editor

Open wlsnxx opened this issue 5 years ago • 3 comments

Just a suggestion, put option to open *.tscn into godot editor

wlsnxx avatar Jun 28 '20 02:06 wlsnxx

The LSP specification doesn't cover this use case. Executing godot in editor mode with the path of the scene file will open a new instance of the engine instead of using the already open instance. I dont think this is possible to implement only on the extension side.

It seems like the LSP has custom messages for godot-specific stuff (see GDScriptLanguageClient.ts:125) but it doesn't seem like the current implementation (on master) of the LSP server supports opening files in the engine from VSCode.

linkpy avatar Oct 28 '20 14:10 linkpy

It would be pretty easy to implement this by just going around the language server.

A very simple EditorPlugin could host a websocket server, and godot-tools can use that to execute whatever functions it needs.

As a bonus, this can also support other text editors or any other type of software, if you want to remotely control your godot editor for some reason.

I expect to have a proof-of-concept done tonight.

DaelonSuzuka avatar Feb 12 '22 13:02 DaelonSuzuka

Concept proved: Code_yJtyO59FML

Godot_v3 4 2-stable_win64_Jw5gkbOtnB

DaelonSuzuka avatar Feb 13 '22 02:02 DaelonSuzuka