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(lsp): Explicit type annotation code action #2125

Merged
merged 3 commits into from
Jul 29, 2024

Conversation

alex-snezhko
Copy link
Member

Screenshot from 2024-07-25 21-38-55

Screenshot from 2024-07-25 21-39-01

Screenshot from 2024-07-25 21-39-09

Copy link
Member

@marcusroberts marcusroberts left a comment

Choose a reason for hiding this comment

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

Great work Alex! A really useful feature to add too, thank you!

Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Two questions for you: what's with the version additions, and what happens if you use this code action on something that already has an annotation?

compiler/src/language_server/code_action.re Outdated Show resolved Hide resolved
@alex-snezhko alex-snezhko force-pushed the alex/explicit-annotate-code-action branch from 4ddd10e to 8a5275c Compare July 29, 2024 04:40
@alex-snezhko
Copy link
Member Author

alex-snezhko commented Jul 29, 2024

@ospencer I got rid of the version stuff and it doesn't look like it made a difference actually (at least in VSCode's LSP client); I saw in the LSP documentation that the version was one of the response properties so that's why I implemented it initially.

The code action dialog should no longer show if it's tried on something that's already annotated; I realized that there was actually a flaw in my implementation which sometimes showed the code action dialog on something that was already annotated, but I patched it.

Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Looks great!

@ospencer ospencer enabled auto-merge July 29, 2024 04:46
@ospencer ospencer added this pull request to the merge queue Jul 29, 2024
Merged via the queue into main with commit d34d381 Jul 29, 2024
12 checks passed
@ospencer ospencer deleted the alex/explicit-annotate-code-action branch July 29, 2024 06:00
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.

3 participants