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

Can we make urls in tooltip clickable? #984

Open
Jolg42 opened this issue Dec 3, 2021 · 3 comments
Open

Can we make urls in tooltip clickable? #984

Jolg42 opened this issue Dec 3, 2021 · 3 comments
Labels
domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/improvement An improvement to existing feature and code. status/needs-upstream-support Not currently possible to implement due to lack of upstream support topic: diagnostics topic: linting

Comments

@Jolg42
Copy link
Contributor

Jolg42 commented Dec 3, 2021

This is maybe a particular example where the warning text comes from prisma-fmt and includes a warning, the link is not clickable. (related)

in insiders v31.0.378
Screen Shot 2021-12-03 at 12 34 10

Not sure if we have other tooltips with links?

Example schema

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider        = "prisma-client-js"
}

type MyString = String @default("A")

model Code {
  id  String   @id
}
@Jolg42 Jolg42 added kind/improvement An improvement to existing feature and code. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. labels Dec 3, 2021
@janpio
Copy link
Contributor

janpio commented Dec 3, 2021

First approach might be trying to return a markdown link - would not be surprising if that was picked up.

@Jolg42
Copy link
Contributor Author

Jolg42 commented Dec 6, 2021

Indeed, could be the solution here!

@Druue
Copy link
Contributor

Druue commented Jul 18, 2024

So, the LSP supports this per PR#1905 which made it into version 3.18.0

Currently the latest version of vscode-languageserver (9.0.1 as of time of writing) uses version 3.17.5 of the LSP.

But it's then also up to the individual clients to add support for this.

VS Code support is tracked here:

NeoVim support is being worked on here

Note that Diagnostic does support including a URI in the codeDescription: { href: ... }.
We have an example of that here but we also do not currently use LSP diagnostics in engines so we would either need to encode support for these codes and URIs in engines errors / warnings.

@Druue Druue added topic: diagnostics status/needs-upstream-support Not currently possible to implement due to lack of upstream support labels Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/improvement An improvement to existing feature and code. status/needs-upstream-support Not currently possible to implement due to lack of upstream support topic: diagnostics topic: linting
Projects
None yet
Development

No branches or pull requests

3 participants