What options are available to use with the vscode:// url scheme?

Viewed 281

In GitLab, when you click on the blue "Clone" button you will see several options:

  • Clone with SSH
  • Clone with HTTPS
  • Open in your IDE

enter image description here

The "Open in your IDE" section shows the option "Visual Studio Code", which is a url of the following form:

vscode://vscode.git/clone?url=<url_encoded url pointing to the .git repository>

I am unable to find any documentation in the VSCode website. What other options are supported by VSCode apart from vscode://vscode.git/clone?url=... ? Where can I find more information about this?

By "Options" I mean methods (GET / POST), servers (vscode.git), endpoints (clone?...) and parameters (url=...)

1 Answers

Not sure if we still have it in vscode docs, but going through the code I found that currently it supports adding windowId=_blank to help it open in new window analogous to code -n <mypath>.

e.g. <a href="vscode://file/<mypath>?windowId=_blank"> Open in Code</a>

If we don't provide that it reuses the existing window, analogous to code -r <mypath>

Related