language-tools
language-tools copied to clipboard
The Prisma vscode extension does not resolve files that are inside nested directories when using `prismaSchemaFolder`
Thanks for the excellent work on Prisma 😄 I'm encountering a bug as follows:
Bug description
I am using the prismaSchemaFolder preview feature. My source code is structured by module, i.e.:
src
├── modules
│ ├── company
│ │ ├── company.graphql
│ │ ├── company.prisma
│ │ └── company.resolver.ts
│ ├── project
│ │ ├── project.graphql
│ │ └── project.prisma
└── schema.prisma
The Prisma CLI is able to correctly generate based on the nested Prisma files, but the VS Code extension is not, as indicated in the following screenshot:
How to reproduce
- Clone the repository at https://github.com/tom-groves/prisma-extension-nested-schema-folders-example
- Open in VS Code
- Running
npx prisma generatewill generate the Prisma Client successfully - Nested Prisma schemas, such as
src/modules/company/company.prisma, will be in an error state
Expected behavior
The Prisma extension resolves the various nested .prisma files.
I knew about the workaround in the comments of the discussion. It might be helpful for someone.
I think this issue was resolved by https://github.com/prisma/prisma/pull/27075 If you can use prisma.config.ts, lsp works correctly.