Skip to content

Make file hyperlinks open in Positron in R package dev tasks #5409

Closed
@jennybc

Description

@jennybc

Various R package dev tasks can emit file hyperlinks, e.g. to the exact location of a failing test. In our integrated terminals, these links currently have a form that leads to them being handled by the operating system. For many long time R users, this will mean that clicking on such a link opens the file in RStudio!

However, VS Code and, therefore, Positron, have a URL scheme that can communicate "open this file (location) in this product":

https://code.visualstudio.com/docs/editor/command-line#_opening-vs-code-with-urls

General form:

{product}://file{some/absolute/path}

You can experience this in VS Code by executing this in a terminal (substitute the path to a specific file on your computer):

printf '\e]8;;vscode://file/Users/jenny/rrr/cli/DESCRIPTION\e\\DESCRIPTION file\e]8;;\e\n' 

Or likewise in Positron:

printf '\e]8;;positron://file/Users/jenny/rrr/cli/DESCRIPTION\e\\DESCRIPTION file\e]8;;\e\n' 

Positron or the positron-r extension should signal to amenable 3rd parties (such as the cli package) that this form of for file URLs is supported. Similar to #5218, this is going to require associated work in cli.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions