godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.47k stars 148 forks source link

Last update have a different configuration settings without warning. #599

Open git2013vb opened 4 months ago

git2013vb commented 4 months ago

Godot version

v4.2.1.stable.official [b09f793f5]

VS Code version

Version: 1.86.2 Commit: 903b1e9d8990623e3d7da1df3d33db3e42d80eda Date: 2024-02-13T19:41:37.860Z Electron: 27.2.3 ElectronBuildId: 26908389 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Linux x64 5.10.0-28-amd64

Godot Tools VS Code extension version

2.0.0

System information

Debian 11

Issue description

As stated in title, godot-tools show false errors. I have in my projects several autoloads. The extension do not recognize which autoload use, it mix references between projects. Also, I use a different ports between two vscode instaces for language server. It happen since last update.

EDIT: After a few investigations, turns out its not a bug but a different configuration settings. I guess there isn't a way to communicate these changes to users?

Anyway: good job!

Thanks

Steps to reproduce

Use the last update with two projects and some autoloads.

DaelonSuzuka commented 4 months ago

There is supposed to be a notification that appears, telling you that the setting names have changed and that they have been automatically updated. It seems like that feature isn't triggering for people, so I apologize for the confusion on that front.

I suppose that the auto-updater wouldn't have helped you anyways, because I don't actually know how to specifically check user settings vs workspace settings.

git2013vb commented 4 months ago

No problem for me, at least because I know where to look. :)

I noticed some other problems: When I "save" a file with ctrl+s it set a space where no need: BTPlayerStats._enum.BATTLE_READY became BTPlayerStats._ enum .BATTLE_READY. Note that is not "enum" but "_enum". When I scroll up a long scene in "scene:preview" it glue the first 3~4 rows at top . it work as intended?

Request feature: 1) It will possible to add some Breadcrumb navigation for scenes in scene:preview? 2) It will be possible to add a contextual menu voice that help to paste a onready statement like @onready var model: BorderlandModel = $"%model" as BorderlandModel from a node selected in scene like how godot editor do?

Thanks :)

DaelonSuzuka commented 4 months ago

When I "save" a file with ctrl+s it set a space where no need: BTPlayerStats._enum.BATTLEREADY became BTPlayerStats. enum .BATTLE_READY. Note that is not "enum" but "_enum".

Do you have VSCode's format-on-save enabled?

When I scroll up a long scene in "scene:preview" it glue the first 3~4 rows at top . it work as intended?

Yes, that's the VSCode feature "sticky scrolling".

It will possible to add some Breadcrumb navigation for scenes in scene:preview?

What would the breadcrumbs show?

It will be possible to add a contextual menu voice that help to paste a onready statement like @onready var model: BorderlandModel = $"%model" as BorderlandModel from a node selected in scene like how godot editor do?

You can already drag a node into the scene to insert it's $Node/Path. I don't think I can do the @onready var, because the Godot editor knows a lot more about your code and your scenes than this extension does.

git2013vb commented 4 months ago

What would the breadcrumbs show?

Well, I was thinking the "parent" scene when you click a instantiated scene. but I reckon it can happen to have more than one parent at same time. lets forget that for now - I think it can be a bit difficult to implement it ;).

You can already drag a node into the scene to insert it's $Node/Path. I don't think I can do the @onready var, because the Godot editor knows a lot more about your code and your scenes than this extension does.

I was thinking you have already all info you need for in vscode: type and name. For example, to obtain this:

@onready var blue_team:Node2D = $"%BlueTeam" as Node2D

you have already

[node name="BlueTeam" type="Node2D" parent="model/Peers/Blue"]
unique_name_in_owner = true

ps.: Note in this example the flag unique name ;)

Extract the same name as snake_case from Pascal case. and in menu add for it a voice "Copy @onready var"

Do you think its feasible?

Also the "drag-shift_drop" do not take count of unique sign %.

for example if I have a node LoginScreen that is under unique name it have to drop it like $"%LoginScreen". As is now it became $view/Gui/LoginScreen (its complete path) - bug?

Thanks. :)