Skip to content

Fix legacy namespace and adds HoverURL #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged

Fix legacy namespace and adds HoverURL #25

merged 1 commit into from
Jun 11, 2025

Conversation

diofeher
Copy link
Member

@diofeher diofeher commented Jun 10, 2025

Relates to opentofu/vscode-opentofu#6

While integrating with vscode-opentofu, I noticed I understood wrong where DocsLink is used. For the purpose of the work I was doing, I should've been using HoverURL. This is what is used when hovering the element.

Screenshot of integration:

Screenshot 2025-06-10 at 16 34 34

DocsLink is used in another view of VSCode:

Screenshot 2025-06-10 at 16 34 54

This PR fixes another misunderstanding. When provider addresses have namespaces using hashicorp, they are mostly being treated as LegacyAddresses in our code:

https://github.com/opentofu/registry-address/blob/901b9ae4061a6e83e7db96e71b8d7088294930b3/provider.go#L166

So now, if we have any LegacyAddr, we use the namespace as hashicorp both on the HoverURL and the DocsLink.

Signed-off-by: Diogenes Fernandes <[email protected]>
@diofeher diofeher requested a review from a team as a code owner June 10, 2025 19:35
@diofeher diofeher self-assigned this Jun 10, 2025
@diofeher diofeher merged commit b848c18 into main Jun 11, 2025
5 checks passed
@diofeher diofeher deleted the hover-fix branch June 11, 2025 11:16
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