-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Allow one config to extend another configuration #268
Comments
Having a way of defining common properties for a bunch of configs at once sounds like a useful feature, so I'll change this issue into adding that feature. So for this feature request:
For your specific problem, you can actually reuse the same config if it's just the path you want to change:
{
"folders": [
{
"name": "SSH FS - config-name",
"uri": "ssh://config-name/"
}
],
}
Alternatively, if you try to add a workspace folder (or open a terminal) using the |
This is a much better way than I had started to code it myself before I checked the roadmap. However, my suggestion might still be good to have since most people using the extension will have existing configurations that were not setup using the new method that extends a confguration. I was simply going to add a 'Clone configuration' option to the command pallet (and possibly a clone option next to each existing configuration). If launched from the command pallet it would prompt with a dropdown to select an existing configuration. Then it would pass all the existing configuration's settings into the create new config screen. From there you could modify the settings according to your needs and save it as a new configuration. The method you plan on creating is much better because in theory if you needed to update a connection option - all existing configurations would inherit the change. However, like I said earlier, this new feature wouldn't work for existing configs that were already configured before this new feature. Additionally, there may be cases where you don't want the new configuration to inherit another connections configuration but starting with a cloned copy of another configuration could be helpful to quickly create a new one. Maybe I'm overthinking it but the option of cloning an existing configuration seems like it might be a quicker way to get exactly what you need, especially if the setting you want to keep isn't one that was set to be inherrited. Does that make sense? EDIT: by the way, this extension rocks. I used to mount external drives over SSHFS via the command line and then open the directory in my editor of choice. This extension has saved me a lot of time and frustration. Not to mention that the speeds are significantly better than how I was mounting remote drives in the past! 🥇 |
I'd probably add a clone button in the Settings UI, either as an inline button when selecting a config, or as some sort of "Click here to copy settings from another config" within the config editor itself. Perhaps even go fancy and have a side-by-side editor that lets you compare and pick which fields to copy over. That's for copying configs. I'm of course still gonna add a way to extend configs, as I originally mentioned. |
Agreed - Extending configs is super useful. I like your fancy idea 😉 and your suggested implementation of copying configs is probably easier.... |
Hi @SchoofsKelvin, could we proceed to implement this supper useful feature? |
The config now supports an This feature will be added in the next version of the extension, which should be v1.26.0. In case config A extends config B and C, first the options from config B are taken, then from config C (overriding anything that B specified that C also specifies), and finally options from config A are taken, again overriding anything that B/C already defined that A also defines. In short, priority in the extend list goes from front-to-back followed by the config itself. Also it's valid for a config to extend another config which in turn extends another config. If you end up with a cycle though, all related configs will not be loaded and you'll get an error message. |
I really like your extension, but it is hard to allways copy the credentials to the new connection. Is it possible to move the credentials like Username, Password, Host, ... to the group and only leave the path in the entry itself? So that you can open multiple folders on one remote server?
The text was updated successfully, but these errors were encountered: