haskell / vscode-haskell

VS Code extension for Haskell, powered by haskell-language-server
https://marketplace.visualstudio.com/items?itemName=haskell.haskell
Other
561 stars 90 forks source link

Shortcut to evaluate code lenses #1074

Open emlautarom1 opened 6 months ago

emlautarom1 commented 6 months ago

Is your feature request related to a problem? Please describe.

This feature request is not related to a problem.

Describe the solution you'd like

The eval plugin allows users to test code quickly directly in the same source file in which they're working. Unfortunately, evaluating the code requires clicking with the mouse on the "Evaluate" or "Refresh" code lenses, which is annoying if you're committed to a keyboard-only workflow.

Ideally, you could set up a keyboard shortcut that triggers the evaluation of the code lens directly, without requiring the usage of the mouse.

Describe alternatives you've considered

Continue using the mouse to trigger code lens evaluations :disappointed:

Additional context

image

fendor commented 6 months ago

Hi, thank you for the bug report!

This sounds like a nice feature. @michaelpj is that something we have to implement in the vscode-haskell extension or directly in HLS?

michaelpj commented 6 months ago

See https://github.com/haskell/haskell-language-server/issues/4155. Then many clients provide a way to trigger "the unique code action at this point"; or we can give it a distinct code action kind, and many clients allow filtering on that.