Skip to content

Conversation

daveyc123
Copy link
Contributor

The Swift compiler contains educational notes to further describe diagnostics [1]. These educational notes are documented in markdown files that are contained within the toolchain.

Sourcekit LSP includes a link to the local markdown file when returning diagnostics that have an associated educational note (as part of the diagnostic code). The default behaviour in VSCode is to present these as a link in the diagnostic hover, and open the editor to the markdown file when the link is clicked.

This PR updates the behaviour for educational notes to instead open the link using the markdown preview, which shows nicely rendered content. It also updates the link in the hover to show "More
Information" instead of the code.

Issue: #1395

[1] https://github.com/swiftlang/swift/tree/main/userdocs/diagnostics

The Swift compiler contains educational notes to further describe
diagnostics [1]. These educational notes are documented in markdown
files that are contained within the toolchain.

Sourcekit LSP includes a link to the local markdown file when returning
diagnostics that have an associated educational note (as part of the
diagnostic code). The default behaviour in VSCode is to present these
as a link in the diagnostic hover, and open the editor to the markdown
file when the link is clicked.

This PR updates the behaviour for educational notes to instead open
the link using the markdown preview, which shows nicely rendered
content. It also updates the link in the hover to show "More
 Information" instead of the code.

Issue: swiftlang#1395

[1] https://github.com/swiftlang/swift/tree/main/userdocs/diagnostics
@daveyc123 daveyc123 requested a review from award999 March 7, 2025 16:47
@daveyc123 daveyc123 merged commit db7a431 into swiftlang:main Mar 7, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants