summaryrefslogtreecommitdiff
path: root/common/home/programs/nixvim/plugins/dap.nix
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-04-06 09:33:22 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2026-04-06 09:33:22 +0200
commit225c795749a68088c1e33d58ac66209a06ee62a7 (patch)
tree8b6eed0555a32dd0c16a9afc7b997a556b1ed0b9 /common/home/programs/nixvim/plugins/dap.nix
parent20871c5109aa5590384d5e60ebeab3d0d22fdafd (diff)
2026-04-06 updates by auto-switch
Diffstat (limited to 'common/home/programs/nixvim/plugins/dap.nix')
-rw-r--r--common/home/programs/nixvim/plugins/dap.nix31
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";
+ }
+ ];
};
}