nixvim
nixvim copied to clipboard
[BUG] nvim-dap how to configure target executable?
Field | Description |
---|---|
Plugin | nvim-dap |
Nixpkgs | unstable |
Home Manager | `unstable |
- [x] I have read the FAQ and my bug is not listed there.
Description
Pretty sure this isn't a bug, but how do I do anything other than hard-coding the path to the target debug executable in the dap configuration section? The examples over at the nvim-dap repo uses a lua function. Can I not pass it like this? I'm not getting any errors but the program doesn't launch. Hard-coding a file path does work.
programs.nixvim.plugins.dap.configurations.c = [{
name = "Debug";
type = "gdb";
request = "launch";
program = ''
function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end
'';
}];
Thank you.
Looking at the docs, this doesn't seem to be an option.
We could change plugins.dap.configurations.*
to be attrs of anything and allow the user to configure it according to the plugin docs, similar to how cmp.settings
works.
OK sounds like a good idea. I thought program
already worked like that since it's not explicitly specified in the nixvim config (but type
, request
, name
are). Hard-coding the path doesn't really lend itself to a generic configuration :)