Neovim for Haskell

Neovim is the best Haskell editor, thanks in large part to Marc Jakobi’s excellent haskell-tools plugin.

If you configure your Neovim with Nix you can use this snippet to get started quickly.

Note

Please consider starring haskell-tools on GitHub. Developers appreciate it!

{ pkgs, ... }:

{
  programs.neovim.plugins = with pkgs.unstable.vimPlugins; [
    haskell-tools-nvim
  ];

  xdg.configFile."nvim/ftplugin/haskell.lua".text = ''
    local ht = require('haskell-tools')
    local bufnr = vim.api.nvim_get_current_buf()
    local opts = { noremap = true, silent = true, buffer = bufnr, }

    ht.lsp.start()
  '';
}