Skip to content
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

Completion of module source and version #672

Closed
2 of 3 tasks
radeksimko opened this issue Jun 18, 2021 · 1 comment · Fixed by hashicorp/terraform-ls#1024
Closed
2 of 3 tasks

Completion of module source and version #672

radeksimko opened this issue Jun 18, 2021 · 1 comment · Fixed by hashicorp/terraform-ls#1024
Assignees
Labels
enhancement New feature or request modules Functionality related to the module block and modules generally terraform-ls Features/bugs which will be implemented/fixed purely on the LS side
Milestone

Comments

@radeksimko
Copy link
Member

radeksimko commented Jun 18, 2021

Problem Statement

Module sources are not always easy to get right and often times these are copy-pasted, or typed manually (which increases the risk of typos). Either way the user would benefit from some extra help there.

module "example" {
  source = # HERE
}

Relatedly users would benefit from being able to pick a version from a list, instead of typing it in.

Expected User Experience

source

  • User will be provided with any known/tracked local modules (i.e. local file paths)
  • User will be provided with any matching module sources from the Registry
  • Required inputs will be pre-filled, if the feature is enabled
Screen.Recording.2022-04-22.at.11.52.58.mov

version

User will be provided with a list of published versions for a given Terraform Registry-published module.

Screen.Recording.2022-04-22.at.11.53.45.mov

Typing will filter versions and versions will be sorted with the latest ones on top (unlike in the recorded demo).

Proposal

hashicorp/terraform-ls#869

Implementation Notes

LSP autocompletion part of the spec uses isIncomplete which we should probably use for the dynamic results from the API
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_completion

for speed clients should be able to filter an already received completion list if the user continues typing. Servers can opt out of this using a CompletionList and mark it as isIncomplete.

@radeksimko radeksimko added enhancement New feature or request terraform-ls Features/bugs which will be implemented/fixed purely on the LS side labels Jun 18, 2021
@radeksimko radeksimko changed the title Completion of module sources Completion of module source and version Jun 18, 2021
@danieldreier danieldreier added the modules Functionality related to the module block and modules generally label Jul 23, 2021
@radeksimko radeksimko added this to the v2.24.0 milestone Jul 19, 2022
@dbanck dbanck self-assigned this Jul 28, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request modules Functionality related to the module block and modules generally terraform-ls Features/bugs which will be implemented/fixed purely on the LS side
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants