-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add on_config hooks to dap.providers #1241
Conversation
Example: | ||
>lua | ||
local dap = require("dap") | ||
dap.providers.on_config["dummy-noop"] = function(config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not sure about the overall naming. Other options:
dap.ext.on_config
anddap.ext.configs
dap.ext.on_config
anddap.ext.config_providers
dap.config_providers
anddap.config_hooks
I'd kinda like having a namespace because I have in mind of also adding variable-placeholder-processors and later on likely variable formatters for the REPL and widgets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving it to dap.listeners.on_config
: #1248
Should solve #720
Makes the implementation a bit simpler. Given that the function is called from a coroutine it is still possible to use coroutine.running(), coroutine.resume() and coroutine.yield() within it for async operations.
I'm going ahead and merge this but this doesn't mean that the API is final and I'd still very much appreciate feedback about it. |
No description provided.