Files
snippets/nvim-config/lua/plugins/haskell.lua
2025-10-08 10:12:22 +02:00

33 lines
1.0 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

return {
{
"mrcjkb/haskell-tools.nvim",
-- WICHTIG: expliziter Modulname; Lazy soll NICHT raten
main = "haskell-tools",
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
-- Gib Lazy NICHT die Chance, sein Auto-setup zu machen:
-- Wir liefern EINE eigene config-Funktion und rufen setup() selbst.
config = function(_, _)
local ok, ht = pcall(require, "haskell-tools")
if not ok or type(ht.setup) ~= "function" then
vim.notify("[haskell-tools] setup() nicht gefunden wird übersprungen", vim.log.levels.ERROR)
return
end
ht.setup({
hls = {
-- Dein Nix-HLS, damit Mason außen vor bleibt
cmd = { "haskell-language-server-wrapper", "--lsp" },
settings = {
haskell = {
formattingProvider = "fourmolu",
cabalFormattingProvider = "none",
plugin = { fourmolu = { config = { external = false } } },
},
},
},
})
end,
},
}