-
Notifications
You must be signed in to change notification settings - Fork 237
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
Support multiple files in text-document completions and code actions #4862
Conversation
5bc901e
to
f684c71
Compare
CodSpeed Performance ReportMerging #4862 will not alter performanceComparing Summary
|
WASM Query Engine file Size
|
✅ WASM query-engine performance won't change substantially (1.004x)Full benchmark report
After changes in 585d249 |
Note: do not merge until 5.14.0 is released, changes need to be done synchronously with language-tools |
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.
Just gonna mark this until after release
prisma-fmt/tests/code_actions/scenarios/mongodb_at_map_multifile/config.prisma
Outdated
Show resolved
Hide resolved
...mt/tests/text_document_completion/scenarios/no_default_map_on_postgres_multifile/Test.prisma
Show resolved
Hide resolved
prisma-fmt/tests/code_actions/scenarios/multi_schema_one_model_one_enum_multifile/result.json
Show resolved
Hide resolved
Co-authored-by: Sophie <29753584+Druue@users.noreply.github.com>
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.
✨
You should know the drill for now: instead of a single schema text, we accept a list of
(name, content)
tuples, adapt the rest of the code to use*_multi
methods and point the edits to the correct files.Notable changes here are done to the test setups:
For completions, several prisma files could be put into the test directory. Only one of them suppsed to have cursor marker - that file will be used as a target for completion request, rest of the files will be used for building up the schema.
For code actions, several files in prisma directory are supported. In case more than one file is found, one of the files is expected to be named
_target.prisma
and it will be used as a target for code action request.Other changes in this PR include accepting slices rather than vectors in several
*_multi
method to avoid unnecessary cloning.Close prisma/team-orm#1041