Switch from open
package to using vscode.open
command.
#65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The open command in VSCode's extension API supports choosing a browser (or browser launch options) via the
workbench.externalBrowser
setting. API reference: https://code.visualstudio.com/api/references/commands.Without this change, the
open
package always uses the default browser determined by the OS. This could be customized via theapp
argument (docs: https://www.npmjs.com/package/open). That could be useful if someone wants to customize this extension independent of the full VSCode editor, but I figured removing a dependency and reusing other editor settings would make more sense.Motivating usage
If the extension just uses my default OS browser, that has no launch arguments and uses my "personal profile" when I want to launch my "work profile". I can use this to open a different browser profile (controlled by launch args as indicated by this guide) if I set a script as my
externalBrowser
: