Haskell
info
You can enable the extra with the :LazyExtras
command.
Plugins marked as optional will only be configured if they are installed.
Below you can find a list of included plugins and their default settings.
caution
You don't need to copy the default settings to your config. They are only shown here for reference.
nvim-treesitter
Add Haskell to treesitter
- Options
- Full Spec
opts = { ensure_installed = { "haskell" } }
{
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "haskell" } },
}
haskell-tools.nvim
- Options
- Full Spec
opts = {}
{
"mrcjkb/haskell-tools.nvim",
version = "^3",
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
dependencies = {
{ "nvim-telescope/telescope.nvim", optional = true },
},
config = function()
local ok, telescope = pcall(require, "telescope")
if ok then
telescope.load_extension("ht")
end
end,
}
mason.nvim
- Options
- Full Spec
opts = { ensure_installed = { "haskell-language-server" } }
{
"williamboman/mason.nvim",
opts = { ensure_installed = { "haskell-language-server" } },
}
mason.nvim
- Options
- Full Spec
opts = { ensure_installed = { "haskell-debug-adapter" } }
{
"williamboman/mason.nvim",
opts = { ensure_installed = { "haskell-debug-adapter" } },
}
neotest-haskell
- Options
- Full Spec
opts = nil
{ "mrcjkb/neotest-haskell" }
haskell-snippets.nvim
- Options
- Full Spec
opts = {}
{
"mrcjkb/haskell-snippets.nvim",
dependencies = { "L3MON4D3/LuaSnip" },
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
config = function()
local haskell_snippets = require("haskell-snippets").all
require("luasnip").add_snippets("haskell", haskell_snippets, { key = "haskell" })
end,
}
LuaSnip
- Options
- Full Spec
opts = nil
{ "L3MON4D3/LuaSnip" }
telescope_hoogle
- Options
- Full Spec
opts = {}
{
"luc-tielen/telescope_hoogle",
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
dependencies = {
{ "nvim-telescope/telescope.nvim" },
},
config = function()
local ok, telescope = pcall(require, "telescope")
if ok then
telescope.load_extension("hoogle")
end
end,
}
nvim-lspconfig
Make sure lspconfig doesn't start hls, as it conflicts with haskell-tools
- Options
- Full Spec
opts = {
setup = {
hls = function()
return true
end,
},
}
{
"neovim/nvim-lspconfig",
opts = {
setup = {
hls = function()
return true
end,
},
},
}
telescope.nvim
- Options
- Full Spec
opts = nil
{ "nvim-telescope/telescope.nvim", optional = true }
telescope.nvim
- Options
- Full Spec
opts = nil
{ "nvim-telescope/telescope.nvim" }
nvim-dap (optional)
- Options
- Full Spec
opts = nil
{
"mfussenegger/nvim-dap",
optional = true,
dependencies = {
{
"williamboman/mason.nvim",
opts = { ensure_installed = { "haskell-debug-adapter" } },
},
},
}
neotest (optional)
- Options
- Full Spec
opts = {
adapters = {
["neotest-haskell"] = {},
},
}
{
"nvim-neotest/neotest",
optional = true,
dependencies = {
{ "mrcjkb/neotest-haskell" },
},
opts = {
adapters = {
["neotest-haskell"] = {},
},
},
}