Open lwronski opened 1 year ago
For the implementation, can't the new
command just call https://github.com/VirtusLab/scala-cli/blob/92f069c1439c0431e90f4c3f5666670c43bd8bb4/modules/cli/src/main/scala/scala/cli/commands/setupide/SetupIde.scala#L61 at the end?
For the implementation, can't the
new
command just callat the end?
most other commands, e.g. run
, also call SetupIde.runSafe
in their implementation, so probably best to follow that
Thank you! I'll try to whip something up.
For the implementation, can't the
new
command just call https://github.com/VirtusLab/scala-cli/blob/92f069c1439c0431e90f4c3f5666670c43bd8bb4/modules/cli/src/main/scala/scala/cli/commands/setupide/SetupIde.scala#L61at the end?
most other commands, e.g.
run
, also callSetupIde.runSafe
in their implementation, so probably best to follow that
I'm having trouble filling out the sharedOptions
parameter for the new
command because NewOptions
doesn't have SharedOptions
:
SetupIde.runSafe(???, ???, logger, buildOptions, Some(name), Seq.empty)
I am unsure how to build these. I can do SharedOptions.inputs(...)
but that one expects a lot of parameters so that gives me the impression I'm looking in the wrong direction.
Hi @zetashift, I think it could be beneficial to add SharedOptions
into the new
command. This enable users to specify some configs for their project, such as the Scala version:
scala-cli new VirtusLab/scala-cli.g8 -S 2.13
Is your feature request related to a problem? Please describe.
When users run the new command, Scala CLI should generate a default .bsp/scala-cli.json file to enable IDE imports to work. This idea is based on the comment - https://github.com/VirtusLab/scala-cli/pull/2202#issuecomment-1597192591.