Open irnc opened 1 year ago
Thanks for reporting this @irnc.
What I believe is happening is that VS Code in 1.83.0 is adding a definition to the wikilink (you can see that by putting the cursor is on a wikilink and then running the Go to definition
command, using the F12
key).
I am not sure why they decided to do so.
One might say it's correct, as the wikilink is "defined" in that line. On the other hand when you Go to definition
on a type in a typescript file, you don't got to the import
statement, but to the resource that defines the type. So if anything I would have expected VS Code to navigate to the file associated to the wikilink definition.
I don't know if there is much that can be done on Foam's side. Maybe there is a way to increase the priority of our definition (cmd+click
navigates to the first definition).
This needs a bit of research. Might also be worth raising an issue on the VS Code project.
I don't know of any configuration that would bring previous behaviour back. As Riccardo said, this needs a bit of research to investigate and resolve the issue.
For me workaround was in switching off wikilink references generation, as notes editing workflow doesn't need them. Rationale behind this decision was simple: because it is a concern of a publishing phase, it should be addressed at a later stage.
Excuse me, did you find the way to solve this problem or even temporary method? @irnc @t2hv33
The workaround I have used is to disable generating wikilink references. I haven't found a good path to actually solve the problem.
Describe the bug
After VS Code upgrade to 1.83.0 behaviour of Go to Definition mouse gesture (cmd+click or option+click) on wikilinks changed.
Prior it opened linked note, now it moves focus to the link definition at Wikilink definitions section.
Issue could be reproduced when
foam.edit.linkReferenceDefinitions
setting is set towithExtensions
, i.e. Wikilink definitions section are generated. Setting it tooff
and removing the Wikilink definitions restores desired behaviour, Go to Definition now opens the note file.Small Reproducible Example
No response
Steps to Reproduce the Bug or Issue
Expected behavior
As a user, I expect that Go to Definition mouse gesture would open the linked note, even when Wikilink definitions section are present.
Screenshots or Videos
No response
Operating System Version
macOS
Visual Studio Code Version
1.83.0
Additional context
No response