1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:20:04 +08:00
SpaceVim/docs/layers/lang/haskell.md
2021-06-21 20:39:29 +08:00

1.8 KiB

title description
SpaceVim lang#haskell layer Haskell language support for SpaceVim, includes code completion, syntax checking, jumping to definition, also provides language server protocol support for Haskell

Available Layers >> lang#haskell

Description

This layer is for Haskell development. This layer includes following plugins:

  • haskell.vim: syntax highlight and indent
  • vim-syntax-shakespeare: syntax files for the shakespeare templating languages
  • neco-ghc: completion plugin for Haskell

Install

To use this configuration layer, update your custom configuration file with:

[[layers]]
  name = "lang#haskell"

After updating configuration file, restart SpaceVim and run :SPInstall.

Features

  • code completion
  • syntax checking
  • goto definition
  • refernce finder
  • language server protocol (need lsp layer)

Key bindings

Running current script

To run a haskell file, you can press SPC l r to run the current file without losing focus, and the result will be shown in a runner buffer.

Inferior REPL process

Start a ghci inferior REPL process with SPC l s i.

Send code to inferior process commands:

Key Bindings Descriptions
SPC l s b send buffer and keep code buffer focused
SPC l s l send line and keep code buffer focused
SPC l s s send selection text and keep code buffer focused