halohalospecial / atom-elmjutsu

A bag of tricks for developing with Elm. (Atom package)
https://atom.io/packages/elmjutsu
MIT License
192 stars 24 forks source link

Type Annotation Automation #61

Closed stanshillis closed 7 years ago

stanshillis commented 7 years ago

Elmjutsu shows inferred type annotation warning very nicely on the bottom. I was wondering if it's possible to have some way of automating the process of putting that type annotation into code. Perhaps by clicking on that warning somewhere, or a keyboard shortcut when text cursor is placed on the function with that warning. It is also not possible to copy that suggested signature from the pop-over tooltip or that panel on the bottom (this on mac osx atom 1.14.2). Having ability to copy it from there would help a lot.

Thanks!

halohalospecial commented 7 years ago

Hi! I think you're referring to the linter-elm-make bottom panel/tooltip. If so, the command you're looking for is Linter Elm Make: Quick Fix. Here's a related screen capture: https://raw.githubusercontent.com/mybuddymichael/linter-elm-make/master/images/show-inferred-type-annotations.gif

halohalospecial commented 7 years ago

If you want to copy anything from the bottom panel, you should use Ctrl+C regardless of whether you're using Mac or Windows. It's something specific to the linter package. There's relevant discussion here: https://github.com/mybuddymichael/linter-elm-make/issues/63.

stanshillis commented 7 years ago

thank you! I apologize for posting the question in the wrong place.

halohalospecial commented 7 years ago

No worries! It happens all the time :grin: Maybe because people were used to having Elm plugins that had everything in other (i.e. non-Atom) editors/IDEs.