Skip to content

Map Alt+D to the correct action kind in package.json #1750

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

Merged
merged 2 commits into from
Mar 14, 2025

Conversation

dalps
Copy link
Contributor

@dalps dalps commented Mar 11, 2025

The extension assigns the key binding Alt+D to the very useful "destruct" code action, but currently the key binding doesn't do anything (also see ocaml/ocaml-lsp#1301).

I did some digging and discovered that the definition of the key binding is passing the destruct kind, but ocaml-lsp actually names the kind destruct (enumerate cases).

Now the keybinding is correctly mapped to the destruct action, and I also see the keys suggested in the code actions context menu:
image

@smorimoto smorimoto added the type: bug Something isn't working label Mar 13, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@smorimoto
Copy link
Collaborator

@voodoos I think this should be fixed on the LSP side, what do you think?

@voodoos
Copy link
Collaborator

voodoos commented Mar 13, 2025

@voodoos I think this should be fixed on the LSP side, what do you think?

I don't think so, the action was renamed and split into two in ocaml/ocaml-lsp#1283
This PR looks good to me.

@smorimoto
Copy link
Collaborator

Oh, I didn't know it was renamed. Let's add a change log entry and go ahead!

Signed-off-by: Sora Morimoto <[email protected]>
@smorimoto smorimoto merged commit de8747b into ocamllabs:master Mar 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants