haskell-debugger

This commit is contained in:
Bryan Ramos 2023-06-16 17:49:47 -04:00
parent 4eb8f53a6f
commit dd5c7d382f
2 changed files with 29 additions and 2 deletions

View file

@ -103,3 +103,27 @@ cmp.setup({
["<S-Tab>"] = cmp.mapping.select_prev_item(),
},
})
local dap = require("dap")
dap.adapters.haskell = {
type = "executable",
command = "haskell-debug-adapter",
args = { "--hackage-version=0.0.33.0" },
}
dap.configurations.haskell = {
{
type = "haskell",
request = "launch",
name = "Debug",
workspace = "${workspaceFolder}",
startup = "${file}",
stopOnEntry = true,
logFile = vim.fn.stdpath("data") .. "/haskell-dap.log",
logLevel = "WARNING",
ghciEnv = vim.empty_dict(),
ghciPrompt = "λ: ",
-- Adjust the prompt to the prompt you see when you invoke the ghci command below
ghciInitialPrompt = "λ: ",
ghciCmd = "ghci --test --no-load --no-build --main-is TARGET --ghci-options -fprint-evld-with-show",
},
}

View file

@ -19,6 +19,9 @@ let
pyright
purescript-language-server
];
debug = with pkgs; [
haskellPackages.haskell-debug-adapter
];
in
lsp ++ lsp'
lsp ++ lsp' ++ debug