Adding my answer in case anyone is as stupid as I am:
I accidentally opened the parent folder in vscode, so vscode did not see the project as a salesforce project.