Skip to content

hls

https://github.com/haskell/haskell-language-server

Haskell Language Server

Setup

require'lspconfig'.hls.setup{}

Default values

cmd = { "haskell-language-server-wrapper", "--lsp" }
filetypes = { "haskell", "lhaskell" }
lspinfo = function on_stdout(_, data, _)
        local version = data[1]
        table.insert(extra, 'version:   ' .. version)
      end

      local opts = {
        cwd = cfg.cwd,
        stdout_buffered = true,
        on_stdout = on_stdout,
      }
      local chanid = vim.fn.jobstart({ cfg.cmd[1], '--version' }, opts)
      vim.fn.jobwait { chanid }
      return extra
    end,
root_dir = function(startpath)
    return M.search_ancestors(startpath, matcher)
  end
settings = {
  haskell = {
    formattingProvider = "ormolu"
  }
}
Back to top