Closed andrewferrier closed 2 years ago
Hello @andrewferrier, As you said, this seems difficult, but I can think of 2 solutions right now:
Register in the user config prefixes like "ibm_*" redirecting to a specific registry, and fallback on the hashicorp namespace when nothing match.
Use the lsp capabilities to get the nearest required_providers
. I'm not sure if this is possible, but, this would be the cleanest implementation I think.
I hope this plugin is helpful to you anyway.
👋🏻
Yeah I noticed this too just now after installing 🙂
https://registry.terraform.io/providers/hashicorp/fastly/latest/docs/resources/service_vcl
should be
https://registry.terraform.io/providers/fastly/fastly/latest/docs/resources/service_vcl
Hello @Integralist, thank you for showing your interest. As said just before, the implementation is not trivial. Have you any insight on which implementation should I work on for you to be the most productive?
@Afourcat I think (1) sounds the simplest to implement. (2) could get very complicated very quickly.
I've been trying to figure out if there is some predictable mapping so you can derive e.g. scottwinkler
from shell
(i.e. the Terraform resource prefix), but I cannot see a way that's done - it's just in versions.tf
as best I can tell.
Suggestion - you maintain in the plugin an internal mapping. Then folks like me can contribute to it over time with pull requests etc. You also support the user adding to this mapping with their own personal config, and encourage people in the README to contribute back.
This sounds good to me...
Suggestion - you maintain in the plugin an internal mapping. Then folks like me can contribute to it over time with pull requests etc. You also support the user adding to this mapping with their own personal config, and encourage people in the README to contribute back.
Hello @andrewferrier @Integralist. I think the feature is ready to be tested. If you want to give it a try, you can switch the branch to this one. Feel free to give a feedback 👍
Great. Will check it out in my morning. Thanks!
Can confirm that branch works great now 👍🏻 Thanks!
This works well for me! Thanks.
I'm merging into master 🚀
Hi - thanks for writing this great plugin. It has the potential to be super-useful.
I did notice, though, that it doesn't work for Terraform providers that aren't in the hashicorp namespace. For example, I'm a fairly frequent user of both of these providers:
Yet, these do not work with this plugin, as it assumes they have a hashicorp namespace, like this:
I assume this may be tricky, as (I think) the only definitive source of that info is in the
required_providers
block (not necessarily in the same file as the resource I'm trying to look up) - but it would definitely make it a lot more useful, to me at least.Thanks for your hard work in contributing to the NeoVim community!