haskell-vim is a docker-based Haskell development environment with Vim 8.x.
It comes with syntax highlighting and code completion
powered by Haskell IDE Engine).
Vim is a highly configurable, light-weight editor extremely suitable for programming in Haskell. Compare to heavy IDEs like Eclipse, one does not need to create a project etc. before writing any code. Since the release of version 8.0, it ships an embedded terminal emulator.
Haskell IDE Engine is an excellent Language Server Protocol client compatible with GHC 8.4.3.
However, it is sometimes tricky to get it work with Vim because of the
deoplete.nvim plugin.
Indeed, this plugin requires Vim to be built with python3 support
which is not always the case.
For example, on my Arch Linux machine,
gvimis built withpython3/dynso I failed to getdeopleteto work :(
With haskell-vim, everything just works out of box: syntax highlighting, code completion etc,
and one can thus concentrate on learning and developing in Haskell.
cd docker && docker build -t haskell-vim .Please note that a fresh build will take a LONG time (50+ minutes on my laptop) and consumes many RAM, so be patient :)
Run
docker run -it --rm -v <local/path/to/workdir/>:/workspace boeingx/haskell-vim bashThe above command maps a local folder
<local/path/to/workdir/>to the default work directory/home/haskell/workspacein order to have persistent data.
When build docker image, I get an error saying Process exited with code: ExitFailure (-9) (THIS MAY INDICATE OUT OF MEMORY)
As the error message indicates, this is due to an out of memory. Verify that you have at least 4Gb RAM available.
If you use docker on Windows or Mac OS, edit the preference so that docker could use more memory. See this discussion


