Open linuswagner opened 1 year ago
Ah yes. the reason is that we are not using a common representation for offsets into a file. That has been added later in VScode and github, but everybody uses a different standard. So "plain" text editor simply only see a URI or a URL and go for that.
We could fix it by registering a language server for Rascal values for a specific file extension and parsing the input and resolving the links ourselves. We used to have such a language in Eclipse as well I believe.
There is also vis::Basic
with which you can browse Rascal values. All source locations are proper links in that visualization.
I'm leaving this one open for discussion.
I think this issue is on the wrong repo.
In VS Code we actually have a custom hyperlink detector for the terminal, that overrides the default.
I think this issue is on the wrong repo.
In VS Code we actually have a custom hyperlink detector for the terminal, that overrides the default.
Is this not something that is related to what VS Code identifies as a hyperlink and how it handles that? Where else would it be suited?
True, but this is the vallang repo. I'll try to move it to vscode
On Wed, 13 Sep 2023, 22:41 Linus Wagner, @.***> wrote:
I think this issue is on the wrong repo.
In VS Code we actually have a custom hyperlink detector for the terminal, that overrides the default.
Is this not something that is related to what VS Code identifies as a hyperlink and how it handles that? Where else would it be suited?
— Reply to this email directly, view it on GitHub https://github.com/usethesource/rascal-language-servers/issues/293, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABL3E5CYQ2J4CNRDXW5CPTX2IK7LANCNFSM6AAAAAAZRSTJZ4 . You are receiving this because you commented.Message ID: @.***>
:facepalm:
We can summarize as follows: add a hyperlink detector for Rascal files but also other (text) files in VScode that can recognize our offsets/lengths, lines and columns. And try to see how we do not interact with the other existing detectors.
I want to access the link
|project://mapper/src/main/rascal/DebugUtil/weird.xml|(40,8,<2,15>,<2,23>)
. In the terminal that works fine.If I paste this link into a text file and try to access it, the position part at the end is ignored and I jump to the file instead of the exact position in the file. This is also highlighted visually, as only the location part inside
|...|
is underlined.