auto-complete
Would be nice to get auto-complete in the repl too... :-)
It would be, but there are some architectural quirks in Atom that prevent this from working. I didn't find a way to work around that (yet). This probably will be implemented eventually, but it will take time. Probably quite a bit of it.
In that case, perhaps a substitute for that would be to have a command which executes the currently selected text in a normal .hs file.
Sorry it took so long.
ide-haskell-repl v0.2.1 has two new commands:
-
ide-haskell-repl:copy-selection-to-repl-inputWill copy selection from currently active editor to REPL input, and focus REPL input.
-
ide-haskell-repl:run-selection-in-replWill run selection from currently active editor in REPL as if you typed it in REPL input and executed it.
Both commands open REPL for current file if it's not already open.
I think this can use haskell-ghc-mod to complete, as inside the editor. Do you mean can not use ghc-mod to do that or just can not pass simple Tab char to ghci ? Since ghci capture Tab in a more raw manner (use win_console.h in Win32 for example, an trigger the complete action)?
It would be, but there are some architectural quirks in Atom that prevent this from working. I didn't find a way to work around that (yet). This probably will be implemented eventually, but it will take time. Probably quite a bit of it.
@soiamsoNG, the problem is not making ghc-mod work. The problem is making autocompletion itself work. autocomplete-plus package (which handles autocompletion in Atom) doesn't want to play nice with a custom-built editor instance. I didn't find time to investigate what can be done about that in much detail. And while on topic, interfacing with ghci's autocompletion would be even harder, and probably extremely brittle.
Okay, so basic implementation exists via #45, but there's still room for improvement. New autocomplete-plus API allows to bind autocomplete to custom text editors, so that problem is solved, for the most part. Now the issue is getting all completion info we can from ghc-mod (if available) ~~instead of~~ in addition to ghci, since ghc-mod provides more information.