Skip to content

vscode remote: Interpolate environment variable to build editor link scheme? #509

@coezbek

Description

@coezbek

I am using Visual Studio Code under WSL remote. To build the URL for the editor link scheme I need to access an environment variable for the current distro being used. This works as an initializer, but I was hoping to contribute a patch to the KNOWN_EDITORS.

if defined?(BetterErrors)
  BetterErrors.editor = "vscode://vscode-remote/wsl+#{ENV['WSL_DISTRO_NAME']}%{file_unencoded}:%{line}"
end

Discussion on SO for building the URL path for VS code remote: https://stackoverflow.com/questions/66582696/url-for-opening-vscode-in-file-in-wsl-workspace?noredirect=1#comment124115062_66582696

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions