Use luarocks or your favourite plugin manager.
neovim >= 0.8
luasnip
haskell-language-server
and haskell-tools.nvim
(some snippets work better with LSP).nvim-treesitter
and the parser for haskell.Add the following to your LuaSnip setup.
local ls = require('luasnip')
ls.setup {
-- Add your LuaSnip config
}
local haskell_snippets = require('haskell-snippets').all
ls.add_snippets('haskell', haskell_snippets, { key = 'haskell' })
[!NOTE]
See also
:h haskell-snippets
[!NOTE]
- The recording software ttyrec sometimes has some visual glitches.
- Many snippets provided by this plugin use choice nodes recursively.
haskell-snippets.pragmas.prag
prag
haskell-snippets.pragmas.lang
lang
haskell-snippets.pragmas.discover
discover
haskell-snippets.pragmas.nowarn
nowarn
haskell-snippets.module.mod
mod
haskell-snippets.module.qual
qual
haskell-snippets.module.impc
impc
haskell-snippets.module.qualc
qualc
haskell-snippets.data.adt
adt
haskell-snippets.data.newtype
new
haskell-snippets.data.rec
rec
haskell-snippets.data.cls
cls
haskell-snippets.data.ins
ins
haskell-snippets.data.constraint
=>
haskell-snippets.functions.fn
fn
haskell-snippets.functions.func
func
haskell-snippets.functions.lambda
\
haskell-snippets.expressions.if_expr
if
haskell-snippets.expressions.if_expr_multiline
iff
case
haskell-snippets.expressions.if_expr_multiway
ifmw
haskell-snippets.expressions.lambdacase
\case
haskell-snippets.quasiquotes.qq
qq
haskell-snippets.quasiquotes.sql
sql
All contributions are welcome! See CONTRIBUTING.md.
Here are some other plugins I recommend for Haskell development: