-
Notifications
You must be signed in to change notification settings - Fork 318
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 option to run everything in the current file #3311
Conversation
Does this still requires DAP support from the client ? |
It does require some kind of DAP client, but the command should start the process and return the port to connect to. So some work on the editor side is required to wire the output of the command and starting of the session. |
Thanks for the clarification. Is this simplification only for running files ? do test cases for example require the "old" way (config file). |
Actually the aim of the PR is to provide an universal way of running things:
|
metals/src/main/scala/scala/meta/internal/metals/config/RunType.scala
Outdated
Show resolved
Hide resolved
metals/src/main/scala/scala/meta/internal/metals/config/RunType.scala
Outdated
Show resolved
Hide resolved
246aa7c
to
e82cba6
Compare
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.
Couple nits, but other than that LGTM! I tried it out with nvim-metals
and all seemed to work well!
metals/src/main/scala/scala/meta/internal/metals/config/RunType.scala
Outdated
Show resolved
Hide resolved
metals/src/main/scala/scala/meta/internal/metals/debug/DebugProvider.scala
Outdated
Show resolved
Hide resolved
) | ||
) | ||
} else { | ||
Future.failed(NoRunOptionException) |
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.
Total aside, but on my TODO list to to refactor all this fails out. I'm not a huge fan of using failing futures for control flow. I think we can probably model all of these differently. One day 😆
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.
Are you talking about a dedicated error channel?
This will enable the possibility to run/debug without specifying the configuration in `launch.json` Some further work can be done on the disocery so that we would be able to automatically feel new configurations for the user.
e82cba6
to
0656526
Compare
This will enable the possibility to run/debug without specifying the configuration in
launch.json
Some further work can be done on the discovery so that we would be able to automatically feel new configurations for the user.
Related to #3272