Smarter multiple instances management

The issue

I work with 3 GitLab instances: Gitlab.com, the one from my company and a personal one.

If I well understand, the current way of multiple instances management is to set the instance configuration of the .vscode folder of each project.

It can be quit cumbersome when you have ton of projects to manage.

The proposition

I propose to be able to set a list of GitLab instance URL/token pairs like this:

"gitlab.instances": [
  "gitlab.com": "xXxTokenxXx",
  "git.company.com": "xXxTokenxXx",
  "git.personal.me": "xXxTokenxXx"
]

Then, to determine which instance to use for the project, the extension can took information from the git remote:

❯ git remote -v
origin  ssh://git@git.company.com/the/project.git (fetch)
origin  ssh://git@git.company.com/the/project.git (push)

The .vscode option can still be present, in case if the extension can find any remote matching the list or multiple matches occurs (like for mirrors). But the case would be very rare in my opinion.

What do you think?

Regards

Edited by Sullivan S.