I just moved to Arch from Windows, and I’m curious what people’s vim / neovim plugins are. On Windows, VSC is an easy default, with known extensions, but I assume in Linux there’s the usual emacs vs vim war, as well as a bevy of extensions for both editors. What vim extensions do Haskellers use?
If you’re already happy with VSC you can use it on Linux too!
I assume in Linux there’s the usual emacs vs vim war
I suspect that assuming wars is not a productive way to begin a discussion …
I use vim, no extensions.
I just have hoogle
that I can call via ghci
and ghcid
as a capable IDE.
I use vim with vim-dispatch and vim-tbone and a few personnal mapping to open ghci
to a new tmux
window and have vi to talk to it ,like reload, get the type under cursor etc …(using ghci lesser-known :type-at
, :uses
and :loc-at
commands).
I used to use ghicd
but discover that :set -fobject-code
make reloading really fast (as it compiles the code, but only what has changed).
Neovim: GitHub - neovim/nvim-lspconfig: Quickstart configs for Nvim LSP + GitHub - mrcjkb/haskell-tools.nvim: Supercharge your Haskell experience in neovim!
Emacs: GitHub - emacs-lsp/lsp-mode: Emacs client/library for the Language Server Protocol + GitHub - haskell/haskell-mode: Emacs mode for Haskell
I have worked with both extensively in large codebases for a couple of years and the experience with both is satisfactory.
My recommendation would be to stick to your editor of choice. But if you feel a little adventurous, you can move to a new editor without fear, Haskell is well supported in both.
I second the neovim recommendations. I recommend either astrovim or lazyvim in addition, to have a good amount of functionality available out of the box when starting out. I use lazyvim.
VSC is a slow, bloated Electron app.
It’s basically telling me to get a better editor, and if I’m already Haskelling, why not go to the vim / emacs promised land? 6 months of learning for 10% more productivity… Wait, this sounds familiar… Except I’d say Haskell is 50-200% more.
Just more used to GUI editors in a DE at this point.
As a very long time (neo)vim user who got tired of the never ending and complicated configuration and plugin hunting/updating I switched to the Helix editor.
Helix is a lean, very fast, batteries included modal editor. No plugins, no configuration. Just install (some version of) ghc
and a corresponding language server with ghcup
, install helix (pacman -S helix
) and you are ready to go.
Yeah, tbh, was too hard to get NeoVim and its associated extensions configured with GHCup / HLS.
I hacked VSC to work on Arch and will be doing that for a while as I learn libraries that wouldn’t work because of Windows, but once I’m more comfortable, I’m definitely going back to NeoVim or Helix.