const nsResolverExtension = vscode.extensions.getExtension('ctf0.php-namespace-resolver');
if (nsResolverExtension == null) {
throw new Error("'ctf0.php-namespace-resolver' is required");
}
const NS_EXTENSION_PROVIDER = await nsResolverExtension.activate();
// now u can use it like so
NS_EXTENSION_PROVIDER.getNamespace(vscode.window.activeTextEditor.document.uri) // get namespace by file uri
NS_EXTENSION_PROVIDER.insertNamespace() // insert namespace in current active file
# Check for namespaces project wide
make sure to run composer dump first & fix any reported issues.
run PHP Namespace Resolver: Check for namespaces project wide
note that commented out FQN will show up in the problems panel as well, the cmnd lists all the namespaces that are unknown regardless of its position
also you might get positive-negative results because of nested namespaces, which will need more work to check if the namespace correspond to an actual file path or not