Closed esklarski closed 4 months ago
This is a known problem with with the Language Server, which is a component of the Godot Engine. Unfortunately, this extension just uses the language server, and has no control over it's development.
This particular issue has been known for a long time and has been reported here multiple times.
Sorry for the duplicate issue. Thanks for the head's up!
I've created this issue on the Godot Engine repository for anyone who might find this.
I figured it out!
It was a quirk of my file system. If I open the project folder in VSCode from a symlink (~/DATA/blah
) I get this error, but if I open the folder from a root relative path (/mnt/DATA/blah
) the errors disapears.
So beware symlinks and VSCode, I guess.
Very interesting! Thanks for reporting back with your findings.
I feel like things should work properly through symlinks, but it's a lot of extra moving parts, so I'm not surprised either.
I'm going to add this to my mental list of "wierd things the extension could possibly notice and warn you about?", to be worked on at a later time.
It is interesting that it's only this class declaration thing that causes issue. Every other feature I experienced worked as expected.
Like it could complain about hiding a global class, while correctly syntax checking the rest of the document.
Weird indeed.
Godot version
4.2.1
VS Code version
1.86.1
Godot Tools VS Code extension version
1.3.1
System information
Fedora 39
Issue description
All scripts in which I use the
class_name
identifier report the following error in VSCode:Class "xxxxxxx" hides a global script class.
This isn't an issue in the editor, and the game project works fine with no errors in the engine IDE.
I really have no idea where to start looking for a solution.
Steps to reproduce
Load a project folder, connect the language server, open a script that uses the
class_name
syntax.