Open michaelschufi opened 1 year ago
This looks like a bug on the LSP side of things.
I always encounter this problem, especially when creating files with inheritance relationships in vscode
. I need to restart the Godot engine
frequently to get the correct prompts and warnings.
Just encountered the same issue. I see reports back from 2020 of the same issue. Couple of issues in this repo already, https://github.com/godotengine/godot-vscode-plugin/issues/266 and https://github.com/godotengine/godot-vscode-plugin/issues/431
The outcome seems to be: seems like a LSP bug.
The workaround that also found is the same as @BeyondXinXin :
I need to restart the Godot engine frequently to get the correct prompts and warnings.
For future reference, I'm posting this in the existing issue on the Godot engine: https://github.com/godotengine/godot/issues/80822
The outcome seems to be: seems like a LSP bug.
100% an LSP bug.
This sort of thing happens less often for me in Godot 4.2+.
Godot version
v4.1.1.stable.official [bd6af8e0e]
VS Code version
1.81.1
Godot Tools VS Code extension version
1.3.1
System information
Windows 10
Issue description
The VS Code extension shows an error that the type (class in this case) cannot be found if the class name is used in the type definition. The Godot Editor can resolve the class without issue.
VS Code:
Godot Editor:
Steps to reproduce
_entity.gd
.class_name Entity
Entity
in a type annotation of a function parameter.