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

Completions: provided by engines break right at the start of a newline #17000

Closed
Druue opened this issue Dec 23, 2022 · 0 comments · Fixed by prisma/prisma-engines#3703
Closed
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/schema Issue for team Schema. tech/engines Issue for tech Engines. topic: autocompletion For within the `.schema` file
Milestone

Comments

@Druue
Copy link
Contributor

Druue commented Dec 23, 2022

Bug description

This was found in the process of adding the new schemas autocompletion for the datasource block and does not affect the other completion that engines provides.
relevant pr


When even a single character after the initial, schemas is available for autocompletion
image

However, this breaks on the initial character of a newline - @tomhoule suggested it being due to the \n newline character being treated as part of the previous line within our spans.
image

How to reproduce

Expected behavior

This should be able to trigger engines completions from anywhere on a new line, not just after the initial character

Prisma information

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

datasource db {
    provider = "postgres"
    url      = env("DATABASE_URL")

}

Environment & setup

  • OS: MacOS
  • Database: Any connector that supports MultiSchema

Prisma Version

Insiders

@Druue Druue added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. tech/engines Issue for tech Engines. team/schema Issue for team Schema. topic: autocompletion For within the `.schema` file labels Dec 23, 2022
@Druue Druue changed the title Autocompletions provided by engines break right at the start of a newline Completions: provided by engines break right at the start of a newline Dec 23, 2022
@Jolg42 Jolg42 added the topic: multiSchema multiple schemas label Jan 2, 2023
@janpio janpio removed the topic: multiSchema multiple schemas label Jan 9, 2023
@Jolg42 Jolg42 added bug/2-confirmed Bug has been reproduced and confirmed. and removed bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. labels Jan 10, 2023
@Jolg42 Jolg42 added this to the 4.9.0 milestone Jan 10, 2023
@Druue Druue self-assigned this Jan 10, 2023
@janpio janpio modified the milestones: 4.9.0, 4.12.0 Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/schema Issue for team Schema. tech/engines Issue for tech Engines. topic: autocompletion For within the `.schema` file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants