summaryrefslogtreecommitdiff
path: root/common/home/programs/nixvim/plugins/dap.nix
blob: 7707bc8aaee6ad90ba99f8b4aa63e8de0137ee8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, ... }:
{
	enable = true;
	adapters = {
		executables.qemu = {
			command = "gdb";
			args = [
				"-i" "dap"
			];
		};
	};
	configurations = {
		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";
			}
		];
	};
}