mrcjkb
haskell-snippets.nvim
Lua

My collection of Haskell snippets for LuaSnip. Powered by tree-sitter and LSP.

Last updated Jun 22, 2026
34
Stars
2
Forks
5
Issues
0
Stars/day
Attention Score
37
Language breakdown
Lua 84.3%
Nix 15.7%
Shell 0.0%
โ–ธ Files click to expand
README


haskell-snippets.nvim

Report Bug

My collection of Haskell snippets for LuaSnip.
Powered by tree-sitter and LSP.

๐Ÿฆฅ

[![Neovim][neovim-shield]][neovim-url] [![Lua][lua-shield]][lua-url] [![Haskell][haskell-shield]][haskell-url] [![Nix][nix-shield]][nix-url]

[![GPL2 License][license-shield]][license-url] [![Issues][issues-shield]][issues-url] [![Build Status][ci-shield]][ci-url] [![LuaRocks][luarocks-shield]][luarocks-url]

Quick Links

Installation

Use luarocks or your favourite plugin manager.

Required

Optional

and haskell-tools.nvim (some snippets work better with LSP).
  • A Haskell tree-sitter parser or
nvim-treesitter and the parser for haskell.

Quick setup

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.addsnippets('haskell', haskellsnippets, { key = 'haskell' })
[!NOTE]
>
See also :h haskell-snippets

Snippets

[!NOTE]
>
- The recording software ttyrec
sometimes has some visual glitches.
- Many snippets provided by this plugin use choice nodes
recursively.

Pragmas

haskell-snippets.pragmas.prag

  • Trigger: prag
tty

haskell-snippets.pragmas.lang

  • Trigger: lang
tty

haskell-snippets.pragmas.discover

  • Trigger: discover
tty

haskell-snippets.pragmas.nowarn

  • Trigger: nowarn
tty

Module and imports

haskell-snippets.module.mod

  • Trigger: mod
tty

haskell-snippets.module.qual

  • Trigger: qual
tty

haskell-snippets.module.impc

  • Trigger: impc
  • Requires a tree-sitter parser for Haskell.
tty

haskell-snippets.module.qualc

  • Trigger: qualc
  • Requires a tree-sitter parser for Haskell.
tty

Data and typeclasses

haskell-snippets.data.adt

  • Trigger: adt
tty

haskell-snippets.data.newtype

  • Trigger: new
tty

haskell-snippets.data.rec

  • Trigger: rec
tty

haskell-snippets.data.cls

  • Trigger: cls
tty

haskell-snippets.data.ins

  • Trigger: ins
tty

haskell-snippets.data.constraint

  • Trigger: =>
tty

Functions

haskell-snippets.functions.fn

  • Trigger: fn
tty

haskell-snippets.functions.func

  • Trigger: func
tty

haskell-snippets.functions.lambda

  • Trigger: \
tty

Expressions

haskell-snippets.expressions.if_expr

  • Trigger: if
tty

haskell-snippets.expressions.ifexprmultiline

  • Trigger: iff
tty
  • Trigger: case
tty

haskell-snippets.expressions.ifexprmultiway

  • Trigger: ifmw
tty

haskell-snippets.expressions.lambdacase

  • Trigger: \case
tty

QuasiQuotes

haskell-snippets.quasiquotes.qq

  • Trigger: qq
tty

haskell-snippets.quasiquotes.sql

  • Trigger: sql
tty

Contributing

All contributions are welcome! See CONTRIBUTING.md.

Recommendations

Here are some other plugins I recommend for Haskell development:

Toolset to improve the Haskell experience in Neovim. Interact with tests in neovim. Hoogle search.

[neovim-shield]: https://img.shields.io/badge/NeoVim-%2357A143.svg?&style=for-the-badge&logo=neovim&logoColor=white [neovim-url]: https://neovim.io/ [lua-shield]: https://img.shields.io/badge/lua-%232C2D72.svg?style=for-the-badge&logo=lua&logoColor=white [lua-url]: https://www.lua.org/ [nix-shield]: https://img.shields.io/badge/nix-0175C2?style=for-the-badge&logo=NixOS&logoColor=white [nix-url]: https://nixos.org/ [haskell-shield]: https://img.shields.io/badge/Haskell-5e5086?style=for-the-badge&logo=haskell&logoColor=white [haskell-url]: https://www.haskell.org/ [issues-shield]: https://img.shields.io/github/issues/mrcjkb/haskell-snippets.nvim.svg?style=for-the-badge [issues-url]: https://github.com/mrcjkb/haskell-snippets.nvim/issues [license-shield]: https://img.shields.io/github/license/mrcjkb/haskell-snippets.nvim.svg?style=for-the-badge [license-url]: https://github.com/mrcjkb/haskell-snippets.nvim/blob/master/LICENSE [ci-shield]: https://img.shields.io/github/actions/workflow/status/mrcjkb/haskell-snippets.nvim/nix-build.yml?style=for-the-badge [ci-url]: https://github.com/mrcjkb/haskell-snippets.nvim/actions/workflows/nix-build.yml [luarocks-shield]: https://img.shields.io/luarocks/v/MrcJkb/haskell-snippets.nvim?logo=lua&color=purple&style=for-the-badge [luarocks-url]: https://luarocks.org/modules/MrcJkb/haskell-snippets.nvim

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท mrcjkb/haskell-snippets.nvim ยท Updated daily from GitHub