From 225c795749a68088c1e33d58ac66209a06ee62a7 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 6 Apr 2026 09:33:22 +0200 Subject: 2026-04-06 updates by auto-switch --- common/home/programs/nixvim/plugins/dap.nix | 31 +++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'common/home/programs/nixvim/plugins/dap.nix') 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"; + } + ]; }; } -- cgit v1.2.3-70-g09d2