Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto formatting is working but auto completion(like relation) is not working #62

Closed
githong-kr opened this issue Mar 1, 2022 · 3 comments
Assignees

Comments

@githong-kr
Copy link

Describe the bug
Auto formatting is working but auto completion(like relation) is not working

Expected behavior

Tools (please provide the output of the following commands):
macOS, vscode, prettier-plugin-prisma v3.10, prisma v3.10

  • Node version: v14.17.6
  • OS name: macOS,
  • Installed prettier versions: v8.1.0
  • Installed plugin versions: v3.10

스크린샷 2022-03-01 오후 1 15 32

@avocadowastaken avocadowastaken self-assigned this Mar 3, 2022
@avocadowastaken
Copy link
Owner

Hey @githong-kr! I've add tests for this case 74452ff, but couldn't reproduce the problem.

Can you try to format with npx prisma format, maybe it will provide more info regarding the problem?

@githong-kr
Copy link
Author

githong-kr commented Mar 12, 2022

@umidbekk
Hi~ Thanks for reply and Sorry for late.

I found the case that auto completion ( like relation )

I used Refreential integrity of Prisma

example of setting the referential integrity

datasource db {
  provider             = "mysql"
  url                  = env("DATABASE_URL")
  referentialIntegrity = "prisma"
}

generator js {
  provider        = "prisma-client-js"
  previewFeatures = ["referentialIntegrity"]
}

And I found that the problem is referentialIntegrity = "prisma" statement

If I remove the statement, auto completion is working!!

working.mov
not.working.mov
working2.mov

!

@avocadowastaken
Copy link
Owner

avocadowastaken commented Mar 12, 2022

Hey @githong-kr, referentialIntegrity is still in preview, so I guess that's why it's not fully covered by formatter, I suggest you to leave a comment in prisma/prisma#9380

cc @tomhoule 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants