Ok, i have tried to create a simple file called test.php where i've added the following lines
$img = new Imagick();
$unknownClass = new Unknown();
First: I do not get an error for "new Unknown()" what is a bit strange cause i created only one php file inside an empty directory there is really no class called "Unknown". I do not have a composer file or vendor dir nor a .vscode directory. For my opinion this is the simplest case i could have..
If make a syntax error it also shows at problems inside vscode. And of course, the directory where i have created the test.php file is trusted by vscode.
However, second thing, i do not get an error for the Imagick class, but if i hover it with the mouse i only see the stub informations if i use the following config
I have tried your setting with my simple PHP file and i do not see any doc informations for imagick again :/
I also tried to deactivate all vscode plugins except PHP Tools, did not help..
Soo, can also you test a simple PHP file inside an emtpy directory (but which is trusted by vscode) and write in the PHP code from above? Cause if you do not have problems with your "php.stubs" config maybe it's a linux specific problem oO (no idea for now what this could be).
At least i will try the same on another client in the evening... debugging at it's best 😉