Skip to content

Support disabling Prisma LSP diagnostics #1827

@nissy-dev

Description

@nissy-dev

Problem

When using multiple databases, prisma.schemaPath can only accept a single value, so the LSP does not work correctly.

└── src/
    ├── database1/
    │   ├── base.prisma
    │   ├── user.prisma
    │   └── ...
    ├── database2/
    │   ├── base.prisma
    │   ├── post.prisma
    │   └── ...
    └── ..

In this structure, you can set prisma.schemaPath to either src/database1 or src/database2, but you cannot handle both at the same time with the LSP.

Suggested solution

I couldn't come up with a good way to make the linting feature work correctly in this case.
However, features like formatting and syntax highlighting in the extension should work even without a schemaPath. Therefore, I would like to make it possible to disable linting.

"prisma.diagnostics.enable": {
  "markdownDescription": "Whether to show lsp diagnostics.",
  "default": true,
  "type": "boolean"
}

A similar feature also exists in rust-analyzer

Alternatives

None

Additional context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions