haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 211 forks source link

Expose "applyrefact:applyAll" as a hie command #1442

Open alanz opened 4 years ago

alanz commented 4 years ago

Register this on startup as part of the capability negotiation, so it is available in all clients.

This obviates the need for https://github.com/alanz/vscode-hie-server/pull/168

fendor commented 4 years ago

Is it also possible to include other commands? Such as ghc-mod:Insert Type which will no longer work as soon as #1126 lands?

alanz commented 4 years ago

@fendor I am proposing only to add a command callback for an existing function, exposed as a code action, not to change the implementation or existence of the function in hie.

Something like the todoCmd exposed in the example2 module. https://github.com/haskell/haskell-ide-engine/blob/c253cbb68a0e36521442fd0882c4ca1e81cf3641/src/Haskell/Ide/Engine/Plugin/Example2.hs#L99-L107