diff options
Diffstat (limited to 'common/home/programs/nixvim/plugins/dap.nix')
| -rw-r--r-- | common/home/programs/nixvim/plugins/dap.nix | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/common/home/programs/nixvim/plugins/dap.nix b/common/home/programs/nixvim/plugins/dap.nix index 88a3ae0..7707bc8 100644 --- a/common/home/programs/nixvim/plugins/dap.nix +++ b/common/home/programs/nixvim/plugins/dap.nix @@ -1,18 +1,29 @@ -{ ... }: +{ lib, ... }: { enable = true; adapters = { - qemu = { - type = "server"; - host = "localhost"; - port = 1234, + executables.qemu = { + command = "gdb"; + args = [ + "-i" "dap" + ]; }; }; configurations = { - zig = { - name = "Zig Qemu"; - type = "qemu"; - request: "attach"; - }; + zig = [ + { + name = "Qemu"; + type = "qemu"; + request = "attach"; + program = lib.nixvim.mkRaw '' + function() + return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/zig-out/bin/", "file") + end + ''; + target = "tcp:localhost:1234"; + stopOnEntry = true; + gdbTarget = "tcp:localhost:1234"; + } + ]; }; } |