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
feat(vscode): Add codelens provider w/ generate client command #1710
Conversation
🤖 Pull request artifactsempty string
|
I just tried it out, and it only works for the first Also, it looks like it only runs "... prisma generate", which breaks if the Prisma schema filename is custom like
see screenshot from GitPod (using the comment above) Also, it looks like it gets stuck if Prisma CLI is not installed, but maybe this instance of GitPod is broken because "npm -v" gets stuck too in the terminal 😓 : |
Hmm, I didn't have the same problem with npm in codespaces @Jolg42 Screen.Recording.2024-04-29.at.17.17.44.mov |
@Druue Nice, then that's probably my instance that was broken, I'll try again later. |
✨ I'm not keen on adding further regex to check if the generator is Screen.Recording.2024-05-01.at.11.13.14.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR!
I'm curious to see people noticing this ✨
Add script runner config setting Register prisma generate client codelens Add event tracking to update script runner for codelens Use script runner as arg for gen client command
- this lets users set a custom schema path for codelenses Removed scriptRunner as prop on codelens provider - see comment for more info - now directly accessingthe config from within `generateClient()` Allow for generate lens to appear over all generators in the file, not just the first
ec0624b
to
e037e3b
Compare
Added a codelens provider to our vscode extension with one codelens command to run
prisma generate
This uses new config to define which script runner to use, whether you want the codelens active or not, and setting a custom path
This shows the following clickable text above the generator block
Which opens up a new output window wherein we run
prisma generate
using the defined script runnerScreen.Recording.2024-04-24.at.18.42.23.mov
Alternatively it is possible to run this through both
closes #1651