Use luarocks or your favourite plugin manager.
neovim >= 0.8luasniphaskell-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.pragpraghaskell-snippets.pragmas.langlanghaskell-snippets.pragmas.discoverdiscoverhaskell-snippets.pragmas.nowarnnowarnhaskell-snippets.module.modmodhaskell-snippets.module.qualqualhaskell-snippets.module.impcimpchaskell-snippets.module.qualcqualchaskell-snippets.data.adtadthaskell-snippets.data.newtypenewhaskell-snippets.data.recrechaskell-snippets.data.clsclshaskell-snippets.data.insinshaskell-snippets.data.constraint=>haskell-snippets.functions.fnfnhaskell-snippets.functions.funcfunchaskell-snippets.functions.lambda\haskell-snippets.expressions.if_exprifhaskell-snippets.expressions.if_expr_multilineiffcasehaskell-snippets.expressions.if_expr_multiwayifmwhaskell-snippets.expressions.lambdacase\casehaskell-snippets.quasiquotes.qqqqhaskell-snippets.quasiquotes.sqlsqlAll contributions are welcome! See CONTRIBUTING.md.
Here are some other plugins I recommend for Haskell development: