1
0
Fork 0
mirror of https://github.com/NotAShelf/neovim-flake.git synced 2024-12-29 15:59:48 +01:00
neovim-flake/modules/plugins/debugger/nvim-dap/nvim-dap.nix

47 lines
1.6 KiB
Nix
Raw Normal View History

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