Using ctrl
/command
+ click
to navigate between files in a repository - No reference found
#7139
Replies: 2 comments 1 reply
-
Thank you for this report! 🙌 The Language Server Protocol that ark/Positron use to provide this kind of navigation lets us do things like "go to definition", "find references", etc, but I don't believe it specifies anything about code navigation for file paths. We can use this discussion post to gather feedback and interest in us building out something new along these lines. In the meantime, you might want to look at other ways to quickly navigate to different files:
|
Beta Was this translation helpful? Give feedback.
-
I've thought about this during my work on making various sorts of hyperlinks work for R package tasks and in integrated terminals more generally. VS Code / Positron integrated terminals are constantly scrutinizing text for anything that looks like a local file path. And when one is found, you get file hyperlink-y-ness "for free". Here's a video of me running R in a terminal inside Positron and you can see this in action: Screen.Recording.2025-04-07.at.11.22.19.AM.movSo far, in the Console, we've implemented our own logic for, e.g., runnable hyperlinks. And file hyperlinks have to be explicit to work in the Console (such as those produced by the cli package ... which is also why cli needs to know about Positron, so that it creates a URI that explicitly opens those files in Positron and does not delegate to the OS).
So I have thought maybe Positron should do less, so to speak? That is, could our Console somehow hook in to the automatic file hyperlinking that happens in integrated terminals? I think it's possible we could get more by doing less, if we can figure out how to turn that feature on in the Console, without causing other problems for ourselves. (This will never solve the runnable code problem, which really does require custom URI handlers.) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
Enjoying using positron. One feature I love about Rstudio is that I can navigate between files referenced in a script by holding
ctrl
/command
and then clicking the file name.So if I have
source("setup.R"
in my script I can holdctrl
/command
and then click "setup.R" and it will open that file.Here's a demo:
rstudio.mov
In positron, this doesn't work, instead the error: "No reference found for 'setup.R'" pops up. Here's a demo:
positron.mov
Happy for any guidance
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions