Extending with custom configurations
I might out my poor Lua skills now, but I'm trying to figure out how to extend the configuration with a custom runner. So, my question is if it's currently possible?
No it's not possible. There's no way to feed in a user config. Take a look at some of the other Neovim DAP adapters for inspiration and a PR should be relatively straightforward.
@olimorris, I did some investigation and it turns out it actually is possible to extend the configuration table. This is what I did it to append a config for running puma-dev:
require('dap-ruby').setup {}
table.insert(dap.configurations.ruby, {
type = 'ruby',
name = 'run puma',
bundle = 'bundle',
request = 'attach',
command = 'puma [...args for puma]',
port = 38698,
server = '127.0.0.1',
options = {
source_filetype = 'ruby',
},
localfs = true,
waiting = 1000,
})
@suketa, perhaps the info above about extending the configuration table could be useful for the readme?
Nice work!
It's common practice for the plugin to have a config.lua file which allows for the default config to be extended/overwritten by a user's. Would be a much cleaner API.