-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Dynamic user input resolution during session launch (similar to VS Code) #816
Comments
Inputs are supported if you're using Lines 338 to 370 in 700a3c7
I won't add extra sugar for them for Lua, because as you pointed out there are already options for that like with |
Alright, cool! Also, I noticed that #629 has a contributions welcome label. How exactly is it different from my proposal? |
That's about adding some kind of |
Problem Statement
Hey Mathias!
I have been using this plugin for a while now (primarily, for python and c++), and I love the simplicity and the flexibility that it provides so far. But there has been one feature that (I feel) is missing, which I believe is a frequent use case.
The
${input:<variable>}
feature from VSCode, which allows the user to either type out their input as a string or select one from a list of pre-defined options when a debug session is being launched. I understand that this feature is already doable to an extent, using the coroutine technique that you have mentioned in #629, but limited to a single function per field in a configuration table, or requires more lua gymnastics to configure.Possible Solutions
I propose adding an
inputs
field to the nvim-dap module table, which specifies the variable names and their input types (pick or prompt), and is used for text substitution in every${input:...}
block. We can provide this functionality for theargs
field in most debug configurations, and extend it toprogram
and other fields easily, if needed.This
inputs
field can be structured similar to theconfigurations
field and/or store different variable specifications per filetype.Below is a proposed translation of the previous
launch.json
example to a lua configuration -I would like to contribute and create a PR if this feature is worth adding to the plugin, since I already have a (possibly naive) working implementation of this in my NeoVim configuration.
Cheers ~
Considered Alternatives
No response
The text was updated successfully, but these errors were encountered: