autodoc: make imports into links #20007
Open
+54
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains three changes:
Keybindings on non US keyboards
The keybindings previously switched on the code (MDN) rather than the key (MDN). Many keyboards are QWERTY based, but I noticed this when pressing
?
. Either UI should change or this key handling should be used instead.Tarballs with backslashes
Tarball unpacking replaces backslashes with forward slashes. Discovered this during local development on Windows where the found files logged
std/Thread\Pool.zig
. Perhaps a change to the std.tar implementation to reject setPath with backslashes is in order. I am not aware if it should be forbidden by the tar implementation, or the caller to understand backslashes will not register as separate directories. Either way, this unpacking change will handle more tarballs, regardless of source.Make imports into links
Before:
After (while hovering the second import statement):
Currently, the import token is the one with link and highlighting (when hovered). The alternative is the import string being linkified. I could try to make that change, but this was the most straightforward version. Field access can also terminate in an import statement now, leading to more identifiers being linked, e.g. the
@import("array_list").XyzVersion
pattern.This ticks one of the TODOs in #19249