-
Notifications
You must be signed in to change notification settings - Fork 132
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
Link to resources, data sources and module sources docs #190
Comments
Hi @richeney We do have plans to build hover support - there is already a draft PR - that isn't adding a link to docs yet, but I would imagine that would be a place where we can add it, similar to how gopls does it: As far as clicking goes I think that is generally represented in LSP in the form of "go to definition" - something we haven't implemented yet either, but I would imagine that it's more likely we would be linking to the source code of the module cached locally. The implementation details are not set in stone, but it will need to work within the boundaries of the LSP and conventions. With that in mind I haven't seen any language server linking directly (on click) to an external URL yet, but my view may be limited, so I would be curious to see if there are any examples of such behaviour in VSCode extension or any other IDE. |
It's great to see the hover support just come in for |
Just FYI I have just released We don't yet have predictable/stable deeplinks to resources or data sources on the Registry, so some more upstream work will need to be done before we can introduce it on the language server side. Also I created #418 to track similar feature for core schema. |
@radeksimko why links do you think that links are not predictable on the registry? there's generic convention, that's imposed on every plugin developer to create markdown files in a very specific format, so that registry is consistent: e.g. for Shortcut may be applied as |
Would love to see this! Also, having resources, data sources and module sources link to the provider docs belonging to the object in question would be a useful first step. |
Hi! I'd like to have a crack at implementing this as a first potential addition to terraform-ls. I've read through https://github.com/hashicorp/terraform-ls/blob/main/docs/architecture.md and plan to use #402 as a starting point and extend it for resources.
I figured I'd get adding common patterns for larger providers such as aws, gcp and azure, then map provider -> provider resource URL pattern for the links. My thinking is that these provider patterns may be configurable as well, so that users may add their own (or submit them as default). Perhaps also a 'test-query' where Do you guys accept PR's? If so, any hints/tips/tricks for this one? |
This would be a great addition; @baalimago re:
maybe @radeksimko or another member can give feedback? 🙏 |
Link to Terraform documentation and module repos
Enhancement summary
This would be a major productivity benefit!
Resource Type Example
For example, if I have
then make
azurerm_resource_group
a follow link (CTRL+click) to https://www.terraform.io/docs/providers/azurerm/r/resource_group.html.If a data source then
azurerm_resource_group
would target https://www.terraform.io/docs/providers/azurerm/d/resource_group.html.Module Source Example
Example module:
Make
github.com/terraform-azurerm-modules/terraform-azurerm-linux-vm?ref=v0.1
a follow link to https://github.com/terraform-azurerm-modules/terraform-azurerm-linux-vm?ref=v0.1.The text was updated successfully, but these errors were encountered: