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

feat(fmt): lsp hover #4923

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

feat(fmt): lsp hover #4923

wants to merge 22 commits into from

Conversation

Druue
Copy link
Contributor

@Druue Druue commented Jun 14, 2024

image

Screen.Recording.2024-06-14.at.20.27.12.mov
Screen.Recording.2024-06-15.at.03.48.47.mov

related: https://github.com/prisma/team-orm/issues/1202
closes: prisma/language-tools#1172

Copy link

codspeed-hq bot commented Jun 14, 2024

CodSpeed Performance Report

Merging #4923 will not alter performance

Comparing feat/hover (b4a66c5) with main (9b8d05f)

Summary

✅ 11 untouched benchmarks

Copy link
Contributor

github-actions bot commented Jun 14, 2024

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.043MiB 2.044MiB -461.000B
Postgres (gzip) 814.749KiB 814.778KiB -30.000B
Mysql 2.013MiB 2.014MiB -461.000B
Mysql (gzip) 801.003KiB 801.036KiB -33.000B
Sqlite 1.914MiB 1.915MiB -461.000B
Sqlite (gzip) 763.011KiB 763.150KiB -142.000B

Druue added a commit to prisma/language-tools that referenced this pull request Jun 17, 2024
Druue added a commit that referenced this pull request Jun 17, 2024
Druue added a commit that referenced this pull request Jun 18, 2024
Druue added a commit that referenced this pull request Jun 19, 2024
@Druue Druue added this to the 5.17.0 milestone Jun 27, 2024
@Druue Druue marked this pull request as ready for review June 27, 2024 11:34
@Druue Druue requested a review from a team as a code owner June 27, 2024 11:34
@Druue Druue requested review from jkomyno and removed request for a team June 27, 2024 11:34
@Druue Druue changed the title feat(fmt): lsp hover feat(fmt): lsp hover structure Jun 27, 2024
@Druue Druue changed the title feat(fmt): lsp hover structure feat(fmt): lsp hover Jun 27, 2024
prisma-fmt/src/hover.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@jkomyno jkomyno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, nice HoverContext abstraction, but I'm unsure about all those info! statements

prisma-fmt/src/hover.rs Outdated Show resolved Hide resolved
prisma-fmt/src/hover.rs Outdated Show resolved Hide resolved
prisma-fmt/src/hover.rs Outdated Show resolved Hide resolved
prisma-fmt/src/hover.rs Outdated Show resolved Hide resolved
prisma-fmt/src/hover.rs Outdated Show resolved Hide resolved
@Druue Druue changed the title feat(fmt): lsp hover feat(fmt): lsp hover - model discovery Jul 3, 2024
@Druue Druue changed the title feat(fmt): lsp hover - model discovery feat(fmt): lsp hover Jul 3, 2024
Druue added 4 commits July 4, 2024 01:23
Added ease of use fn to tops: documentation
Added Name as model position variant

This currently only intentionally triggers over the name of a model and is unimplemented elsewhere. I would ideally leave those as todo to leave it to language-tools in the meantime however language-tools does not currently handle rust panics correctly
Druue added 15 commits July 4, 2024 01:24
…r actually returned as a valid variant, so now it is.

Made `iter_tops` on walkers public. Unsure if there's a better way about this; it seemed the most convenient for right now.

Added a helper to FieldType to retrieve names.

Further clean-up of hover
use topwalker
Show field doc on hover of model and composite field names

add conversion methods to enum / composite type scalar fields for composite type field walker

general cleanup
Druue added a commit to prisma/language-tools that referenced this pull request Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relation information tooltip
3 participants