question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autocomplete does not work for arguments after the first one in `@relation()`

See original GitHub issue

Bug description

When authoring a schema in VSCode with the extension, if onDelete or onUpdate is the first argument in an @relation, autocomplete for referential actions works, but when it comes after another argument, it doesn’t and reverts to the buffer word completion.

image

How to reproduce

Expected behavior

Autocomplete works in that position.

Prisma information

Using a recent version of prisma-fmt (e6bd3dc12d849124a04c3a8e6bd9c194381afda3)

Environment & setup

  • OS:
  • Editor: VSCode
  • Editor version:
  • Extension version: e6bd3dc12d849124a04c3a8e6bd9c194381afda3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tomhoulecommented, Jun 30, 2021

@@index and @@unique are going to take multiple arguments after we merge the constraint names work.

1reaction
pimeyscommented, Jun 30, 2021

It’s not directly related to referential actions. Even with the previous version, if you had fields as the first property, then no autocompletion would work on the second.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure autocomplete for the first argument, leave the others ...
For now, I want to autocomplete the first argument, but leave all the others to fall through to normal autocompletion. How do I...
Read more >
How to pass a function with arguments to another function
I'm trying to make a generic autocomplete function (which actually takes several parameters, and has a bunch of shared logic), so that I...
Read more >
<input>: The Input (Form Input) element - HTML
The <input> HTML element is used to create interactive controls for web-based forms in order to accept data from the user; a wide...
Read more >
Code completion | PyCharm Documentation - JetBrains
If code completion doesn't work, this may be due to one of the following reasons: The Power Save Mode is on (File |...
Read more >
Using functions and nested functions in Excel formulas
Functions are predefined formulas that perform calculations by using specific ... When one function (we'll call this Function B) is used as an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found