Vim editor haskel

Hi, I was wondering if there is a good set up for haskell programming in vim that anyone may want to share and provide a pictures

Thanks :wink:

1 Like

I’m also interested if anyone has a good setup with HLS and vim to share.

I’m mainly just using CoC. I think it’s decent and it has full LSP support but it has a lot of options that I have not explored yet. I’m also using ctrlp for finding files.

1 Like

This is my neoVim setup, with HLS and native neoVim LSP.
I haven’t uploaded pictures yet though.

my dotfiles

Feel free to ask me questions!

2 Likes

Their is a thread on using nix to setup hls.

1 Like

I’m also using the Coc plugin to run HLS. However it feels like I’m missing out on some of the features… I’ve set up bindings for coc-codeaction-line and jumping between errors. Any other recommended config?

I have basically just copied the example config from that github page. It has a bunch of comments explaining what all of it does.

1 Like

In addition to what others have said, I’ve also got a ton of value out of integrating linters like HLint using a linting engine like ALE.

Once installed, it’s just a case of adding something like let g:ale_linters = {'haskell': ['hlint']} to your Vim config.

2 Likes

Binding coc-codelens-action lets you use the eval plugin and some other completion features.

3 Likes

It’s important to note that you need to use coc-codeaction-selected on a visually selected type hole to get Wingman (isovector’s excellent plugin for generating code from types) code actions to show up. They won’t show up for coc-codeaction. This tripped me up for a while

3 Likes