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

Construct custom request implementation #1646

Merged
merged 17 commits into from
Nov 18, 2024

Conversation

PizieDust
Copy link
Contributor

@PizieDust PizieDust commented Nov 14, 2024

Construct

Introduction

This PR implements the Construct Custom Requests.

UX

Trigger this request using Alt+C on a typedhole to select possible construct values. If you select a value with more typedholes, it will continuously display more construct values.

You may also trigger this request from the general commands menu.

Notifications

  • Ocamllsp warning: If ocamllsp is not running at the time the command is invoked, this notification is displayed.
  • No support for requests: If the version of ocamllsp doesn't publish the ocamllsp/handleConstruct capability then this notification is displayed.

Commands

One command is published ocaml.construct which triggers the process.

Key bindings

The key binding Alt+C triggers this command.

Demo

ocaml.construct.mp4

References

cc @voodoos

src/extension_commands.ml Outdated Show resolved Hide resolved
@PizieDust PizieDust marked this pull request as ready for review November 15, 2024 13:56
@PizieDust PizieDust requested a review from voodoos November 15, 2024 14:21
Copy link
Collaborator

@voodoos voodoos left a comment

Choose a reason for hiding this comment

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

Thanks Pizie, it's already in a very good state :-)

src/extension_commands.ml Outdated Show resolved Hide resolved
src/extension_commands.ml Outdated Show resolved Hide resolved
src/extension_commands.ml Outdated Show resolved Hide resolved
src/extension_commands.ml Outdated Show resolved Hide resolved
src/extension_commands.ml Outdated Show resolved Hide resolved
src/extension_commands.ml Outdated Show resolved Hide resolved
src/treeview_commands.ml Outdated Show resolved Hide resolved
src/treeview_commands.ml Outdated Show resolved Hide resolved
@PizieDust PizieDust requested a review from voodoos November 18, 2024 13:05
Copy link
Collaborator

@voodoos voodoos left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, this looks good to go!

@smorimoto smorimoto merged commit 0cafd3b into ocamllabs:master Nov 18, 2024
6 checks passed
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