Use luarocks or your favourite plugin manager.
neovim >= 0.8
luasnip
haskell-language-server
andhaskell-tools.nvim
(some snippets work better with LSP).- A Haskell tree-sitter parser or
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.
- Trigger:
prag
- Trigger:
lang
- Trigger:
discover
- Trigger:
nowarn
- Trigger:
mod
- Trigger:
qual
- Trigger:
impc
- Requires a tree-sitter parser for Haskell.
- Trigger:
qualc
- Requires a tree-sitter parser for Haskell.
- Trigger:
adt
- Trigger:
new
- Trigger:
rec
- Trigger:
cls
- Trigger:
ins
- Trigger:
=>
- Trigger:
fn
- Trigger:
func
- Trigger:
\
- Trigger:
if
- Trigger:
iff
- Trigger:
case
- Trigger:
ifmw
- Trigger:
\case
- Trigger:
qq
- Trigger:
sql
All contributions are welcome! See CONTRIBUTING.md.
Here are some other plugins I recommend for Haskell development:
- mrcjkb/haskell-tools.nvim: Toolset to improve the Haskell experience in Neovim.
- neotest-haskell: Interact with tests in neovim.
- luc-tielen/telescope_hoogle: Hoogle search.