{lib, ...}: let inherit (lib.options) mkEnableOption mkOption; inherit (lib.types) bool attrsOf str; inherit (lib.nvim.binds) mkMappingOption; inherit (lib.nvim.types) mkPluginSetupOption; in { options.vim.debugger.nvim-dap = { enable = mkEnableOption "debugging via nvim-dap"; ui = { enable = mkEnableOption "UI extension for nvim-dap"; setupOpts = mkPluginSetupOption "nvim-dap-ui" {}; autoStart = mkOption { type = bool; default = true; description = "Automatically Opens and Closes DAP-UI upon starting/closing a debugging session"; }; }; sources = mkOption { default = {}; description = "List of debuggers to install"; type = attrsOf str; }; mappings = { continue = mkMappingOption "Continue" "dc"; restart = mkMappingOption "Restart" "dR"; terminate = mkMappingOption "Terminate" "dq"; runLast = mkMappingOption "Re-run Last Debug Session" "d."; toggleRepl = mkMappingOption "Toggle Repl" "dr"; hover = mkMappingOption "Hover" "dh"; toggleBreakpoint = mkMappingOption "Toggle breakpoint" "db"; runToCursor = mkMappingOption "Continue to the current cursor" "dgc"; stepInto = mkMappingOption "Step into function" "dgi"; stepOut = mkMappingOption "Step out of function" "dgo"; stepOver = mkMappingOption "Next step" "dgj"; stepBack = mkMappingOption "Step back" "dgk"; goUp = mkMappingOption "Go up stacktrace" "dvo"; goDown = mkMappingOption "Go down stacktrace" "dvi"; toggleDapUI = mkMappingOption "Toggle DAP-UI" "du"; }; }; }