haskell / haskell-ide-engine

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

Autocompletion snippet wrongly adds type when completing constructor #828

Closed lorenzo closed 6 years ago

lorenzo commented 6 years ago

When completing form example the following:

let a = fromJust Not

And selecting Nothing from the list. You get a wrong snippet:

let a = fromJust Nothing Maybe a

We should omit the last placeholder when completing a constructor

lorenzo commented 6 years ago

Whoever wants to fix this issue, will need to modify this function:

and also write a test case here:

https://github.com/haskell/haskell-ide-engine/blob/master/test/functional/CompletionSpec.hs