Live data from Hacker News

Intero for Emacs: complete interactive development program for Haskell

commercialhaskell.github.io

61–70 of 75 posts

Re: Intero for Emacs: complete interactive development program for Haskell

#61
post #28

I wish I could get a similar utility for Python and Javascript as this seems to show off some cool FP auto complete. I'm basically looking for a way to remove my dependency on my 5-7 IDEs and I don't know how. I wish someone could show me a very good, simple, alternative to all of them. I work in C, Java, JavaScript, Python, PHP, and C# and I'd like to be able to use a single IDE solution for all of them. Sadly I can…

> Sadly I cant find anything with good auto completion and nice features (like things offered by Eclipse). Out of curiosity, have you tried the relevant JetBrains IDE(s)?

That's what I'm trying to move away from. The Eclipse autocomplete is much better in my uses.

I also don't like using 7 different IDEs.

Re: Intero for Emacs: complete interactive development program for Haskell

#62

Earlier quoted context omitted.

I'm not using Spacemacs, but rather Evil mode in Emacs. I think the biggest thing I would caution is to expect small things to be different. For example underscores are word boundaries in Emacs. File selection is different. Some modes do not have vi key bindings set up by default. Escape doesn't always work to abort (you need to get used to pressing ctl-g). Omni complete is absent and completion in Emacs works quite…

> For example underscores are word boundaries in Emacs This is configurable [1] >The word commands’ understanding of word boundaries is controlled by the syntax table. Any character can, for example, be declared to be a word delimiter. [1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Wo...

Thanks for that. My understanding of the documentation leads me to believe that I will have to change it for every single major mode, which is a bit of a pain. But at least it is mostly possible.

Re: Intero for Emacs: complete interactive development program for Haskell

#63

I wish I could get a similar utility for Python and Javascript as this seems to show off some cool FP auto complete. I'm basically looking for a way to remove my dependency on my 5-7 IDEs and I don't know how. I wish someone could show me a very good, simple, alternative to all of them. I work in C, Java, JavaScript, Python, PHP, and C# and I'd like to be able to use a single IDE solution for all of them. Sadly I can…

Have you tried company mode? I personally just use hippie-expand, but my codebases aren't gigantic; unsure how it'd work on larger ones.

What is company mode?

Re: Intero for Emacs: complete interactive development program for Haskell

#64

I wish I could get a similar utility for Python and Javascript as this seems to show off some cool FP auto complete. I'm basically looking for a way to remove my dependency on my 5-7 IDEs and I don't know how. I wish someone could show me a very good, simple, alternative to all of them. I work in C, Java, JavaScript, Python, PHP, and C# and I'd like to be able to use a single IDE solution for all of them. Sadly I can…

As far as python is concerned, if you mostly care about code navigation and autocompletion, try jedi-mode, it's fast, leightweight and works pretty well (I've used it successfully with virtualenv and conda, although the later required me to manually pip install epc-server and jedi and maybe one or two other deps). If you want refactorings, you're out of luck (rope is not even alpha quality, and I don't know of anything else). But firing up your IDE every few days or weeks for a bigger refactoring might be acceptable.

Javascript has js2-refactor, but I haven't tried that.

Lastly, instead of having 5-7 IDEs you could just get an Intellij license – it can basically do all that more specialized offerings like Webstorm and Pycharm can, and it's unlikely you'll ever have similar semantic support in a plain editor. I'm currently using emacs exclusively myself, but have also used products of the intellij family extensively, and might do so again depending on the project. The javascript livecoding and mixed-language-fragment support is pretty neat for example.

Re: Intero for Emacs: complete interactive development program for Haskell

#65
Very nice! But is there currently no way to get any information about third party code other than the type signature (C-c C-t or C-C C-i)? Ideally I'd like to be able to both navigate to the source code and see the documentation.

It might also be good to mention that you need to apt-get install libcurses5-dev for the haskell code to build.

Re: Intero for Emacs: complete interactive development program for Haskell

#66

Earlier quoted context omitted.

> For example underscores are word boundaries in Emacs This is configurable [1] >The word commands’ understanding of word boundaries is controlled by the syntax table. Any character can, for example, be declared to be a word delimiter. [1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Wo...

Thanks for that. My understanding of the documentation leads me to believe that I will have to change it for every single major mode, which is a bit of a pain. But at least it is mostly possible.

[deleted]

Re: Intero for Emacs: complete interactive development program for Haskell

#67

Earlier quoted context omitted.

> For example underscores are word boundaries in Emacs This is configurable [1] >The word commands’ understanding of word boundaries is controlled by the syntax table. Any character can, for example, be declared to be a word delimiter. [1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Wo...

Thanks for that. My understanding of the documentation leads me to believe that I will have to change it for every single major mode, which is a bit of a pain. But at least it is mostly possible.

You could probably do something hacky like modify the current syntax map in after-change-major-mode-hook to apply it to every buffer. Or use something fancier like subword mode.

Re: Intero for Emacs: complete interactive development program for Haskell

#68
post #36

Earlier quoted context omitted.

I had used IDE's, windows based text editors like UltraEdit, and vi/vim for the longest time before I decided it was time to go back to Emacs. I dedicated two weeks to using it almost exclusively to pick up the muscle memory of major keybindings. I haven't looked back since. The keys I really needed out of the gate: * F3/F4 - building macros, then C-x e to execute (after that, just plain e) * C-s - search * M-s o - o…

Eww, chords? This is spacemacs, just use the leader key...

Not when in Holy mode, oh Evil one ;)

Re: Intero for Emacs: complete interactive development program for Haskell

#70

Earlier quoted context omitted.

Ack, you're right! I installed it, added a symlink to the head of my path, but forgot to open a new terminal so continued using the old hashed path. Edit 10 minutes later : Ok, it's installed now. And I've set this up in my .zshrc: -alias vi=vim +alias vi=emacs Let's see how this goes.

If you want a little more terminal magic here are my emacs related shortcuts: alias et='TERM=xterm-256color emacsclient -t' alias ec='emacsclient -c -a=emacs' alias ed='emacs --daemon' alias kill-emacs='emacsclient -e "(kill-emacs)"' alias e='TERM=xterm-256color f -e "emacsclient -c -a=emacs"' The reason for these is that emacs is a little slow to start up (in comparison to vim at least). So you can set up a daemon r…

Thanks for those tips! Just to contribute back a factoid in case you weren't aware, I noticed that the manpage for emacsclient says this:

"If the value of [the alternate editor] is the empty string, run `emacs --daemon' to start Emacs in daemon mode, and try to connect to it."

So your aliases would continue to work if you replace -a=emacs with -a=''. And you'd only pay the startup cost the first time you run ec or e.

Post reply on HN