]> git.rmz.io Git - dotfiles.git/blob - nvim/lua/plugins/lang/haskell.lua
lazyvim: absorb all langs
[dotfiles.git] / nvim / lua / plugins / lang / haskell.lua
1 return {
2
3 -- Add Haskell to treesitter
4 {
5 "nvim-treesitter/nvim-treesitter",
6 opts = { ensure_installed = { "haskell" } },
7 },
8
9 {
10 "mrcjkb/haskell-tools.nvim",
11 version = "^3",
12 ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
13 dependencies = {
14 { "nvim-telescope/telescope.nvim", optional = true },
15 },
16 config = function()
17 local ok, telescope = pcall(require, "telescope")
18 if ok then
19 telescope.load_extension("ht")
20 end
21 end,
22 },
23
24 {
25 "williamboman/mason.nvim",
26 opts = { ensure_installed = { "haskell-language-server" } },
27 },
28
29 {
30 "mfussenegger/nvim-dap",
31 optional = true,
32 dependencies = {
33 {
34 "williamboman/mason.nvim",
35 opts = { ensure_installed = { "haskell-debug-adapter" } },
36 },
37 },
38 },
39
40 {
41 "nvim-neotest/neotest",
42 optional = true,
43 dependencies = {
44 { "mrcjkb/neotest-haskell" },
45 },
46 opts = {
47 adapters = {
48 ["neotest-haskell"] = {},
49 },
50 },
51 },
52
53 {
54 "mrcjkb/haskell-snippets.nvim",
55 dependencies = { "l3mon4d3/luasnip" },
56 ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
57 config = function()
58 local haskell_snippets = require("haskell-snippets").all
59 require("luasnip").add_snippets("haskell", haskell_snippets, { key = "haskell" })
60 end,
61 },
62
63 {
64 "luc-tielen/telescope_hoogle",
65 ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
66 dependencies = {
67 { "nvim-telescope/telescope.nvim" },
68 },
69 config = function()
70 local ok, telescope = pcall(require, "telescope")
71 if ok then
72 telescope.load_extension("hoogle")
73 end
74 end,
75 },
76
77 -- Make sure lspconfig doesn't start hls,
78 -- as it conflicts with haskell-tools
79 {
80 "neovim/nvim-lspconfig",
81 opts = {
82 setup = {
83 hls = function()
84 return true
85 end,
86 },
87 },
88 },
89 }