Add setting for pre-selecting project file path for jack-in in monorepos
This would be helpful in projects using polylith, for example, in which people normally want to jack-in using the top-level deps.edn file.
I think it would be a path relative to the project root, maybe... I don't know if there could be issues with this, such as maybe a workspace with multiple top-level projects added to it.
@PEZ - Thoughts?
Actually, maybe this only makes sense as a project-level setting (not user level), at least as it's described above (relative path).
It would be nice to set this in the project so that team members can utilize it without needing to set it or even be aware of it. Maybe that would be confusing though, unless we either still open the project root quick pick and just highlight the path of the file in the setting, or if we notify the user somehow that the setting value was used. If we don't do something like that, the user may wonder why they can't jack-in to some other sub-project, even if it doesn't make much sense to do so.
The current behaviour is awesome in many monorepos. But ... Polylith ... In those projects you rather want it to remember the last selection.
I think an enum setting makes sense: something like: calva.projectRootMenuAutoSelect with two values:
- Select root closest to active file
- Remember last selected root
Then users choose if they set that on the project or in their user settings. It totally makes most sense as a project/workspace setting.
the user may wonder why they can't jack-in to some other sub-project
They can still do this, right? Just type part of the name of the sub-project and it will get selected.
They can still do this, right? Just type part of the name of the sub-project and it will get selected.
They can't do that if we select something for them without showing a quick pick.
To clarify, I was talking about two separate approaches:
- Preselect a path in the quick pick according to the setting but still show the quick pick (don't select the path for them)
- Use a path according to the setting and don't even show the quick pick
Maybe I wasn't sure what you were suggesting on Slack, but I think # 1 is the best approach, and I now see you were probably suggesting that.
I think this is taken care of somewhat now with jack-in and connect sequences being auto-selectable. WDYT, @bpringe?
I'd say so, from what I know of them. I haven't tried the recently changes yet, but I'll go ahead and close this.