tilapia icon indicating copy to clipboard operation
tilapia copied to clipboard

Emacs LSP HLS Wingman: why no choice about hole filling?

Open tomjaguarpaw opened this issue 2 years ago • 3 comments

In Emacs lsp mode with HLS/Wingman, I can navigate to the typed hole below, hit C-c / and get the context menu. I am offered "Wingman: Attempt to fill hole", but it unilaterally fills it with a! Why doesn't it ask me if I want a or b? dante, by contrast, does ask me.

foo :: Int -> Int -> Int
foo a b = _

tomjaguarpaw avatar Dec 18 '21 17:12 tomjaguarpaw

Side note: I think C-c / is a specific key combination I have configured myself. For others it may be different.

(global-set-key [(control ?c) ?/]
               'lsp-execute-code-action)

tomjaguarpaw avatar Dec 18 '21 17:12 tomjaguarpaw

Hmm, the lsp protocol defines some fixed ways for the interaction between the client (editor) and the server. So not always is possible introduce the input of the user in the required step. Separate the editor from the ide has some disavantadges.

Not sure if in this case it would be possible though.

jneira avatar Dec 18 '21 19:12 jneira

Interesting, thanks! Gives me something to investigate.

tomjaguarpaw avatar Dec 18 '21 20:12 tomjaguarpaw